#36954 [Bgs]: crypt() always use DES with "php -r" option
| From: | bool at boolsite dot net | Date: | Mon, 03 Apr 2006 10:29:23 +0000 |
| Subject: | #36954 [Bgs]: crypt() always use DES with "php -r" option | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95248@lists.php.net to get a copy of this message | ||
ID: 36954
User updated by: bool at boolsite dot net
Reported By: bool at boolsite dot net
Status: Bogus
Bug Type: CGI related
Operating System: Debian Sarge AMD64
PHP Version: 4.4.2
New Comment:
erf... sorry...
Previous Comments:
------------------------------------------------------------------------
[2006-04-03 12:20:39] mike@php.net
The bash replaces the apparent variables.
------------------------------------------------------------------------
[2006-04-03 10:23:09] bool at boolsite dot net
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 this bug report at http://bugs.php.net/?id=36954&edit=1