From: bool at boolsite dot net Operating system: Debian Sarge AMD64 PHP version: 4.4.2 PHP Bug Type: CGI related Bug description: crypt() always use DES with "php -r" option
Description: ------------ Hello, while "CRYPT MD5" works with php-cli, it seems to doesn't works with "php -r" parameter. I tried this : > houyo:~# php -r "echo crypt( 'php.net', '$1$12345678$' ), \"\\n\";" > 23ISkhbvMi6ZY So it used DES. Same code, in a file : > houyo:~# echo "<?php echo crypt( 'php.net', '\$1\$12345678$' ), \"\\n\"; ?>" > test.php > houyo:~# php test.php > $1$12345678$6ezUvDWwuPAu0b27daqPC1 So MD5 works... I checked this too : > houyo:~# php -r "echo CRYPT_MD5;" > 1 and "MD5 CRYPT" is available... I add : it is the Debian package 4.3.10-16... I can't really check with source version. Reproduce code: --------------- houyo:~# php -r "echo crypt( 'php.net', '$1$12345678$' ), \"\\n\";" Expected result: ---------------- $1$12345678$6ezUvDWwuPAu0b27daqPC1 Actual result: -------------- 23ISkhbvMi6ZY -- Edit bug report at http://bugs.php.net/?id=36954&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36954&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36954&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36954&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36954&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36954&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36954&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36954&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36954&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36954&r=support Expected behavior: http://bugs.php.net/fix.php?id=36954&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36954&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36954&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36954&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36954&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36954&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36954&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36954&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36954&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36954&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36954&r=mysqlcfg