php5.3 upgrade or php5.2 with CRYPT_MD5
Ryan Schmidt
ryandesign at macports.org
Tue Jan 12 12:47:09 PST 2010
Quoting myself:
> Quoting Bradley Giesbrecht:
>
>> I am needing to use php5 crypt() with CRYPT_MD5.
>>
>> I have 5.3 on my dev machine and crypt() with CRYPT_MD5 is working
>> fine while on my server with php 5.2.11 has CRYPT_MD5 = 0.
>>
>> Does anyone know of a way to get "CRYPT_MD5 = 1" with macports php5.2.11?
>
> The PHP page about crypt says "As of PHP 5.3.0, PHP contains its own
> implementation and will use that if the system lacks of support for
> one or more of the algorithms." I see the two DES algorithms are
> supported but the MD5 and Blowfish ones aren't. So presumably
> support for those is not in "the system". I'll try to figure out
> what library would provide these algorithms for PHP 5.2.
"The system" in this case refers to the crypt function, which on other
operating systems is the crypt library but which on Mac OS X is built
into the C library. It appears Mac OS X's crypt function doesn't
support MD5 and Blowfish, so that's why it doesn't work in PHP.
It could possibly be fixed by backporting PHP 5.3's implementation of
these functions to PHP 5.2, but that's more effort than I'm going to
put in right now. My recommendation is to use PHP 5.3.x.
More information about the macports-dev
mailing list