note 20655 added to function.crypt

From: Date: Thu, 11 Apr 2002 12:27:46 +0000
Subject: note 20655 added to function.crypt
Groups: php.notes 
Request: Send a blank email to php-notes+get-29110@lists.php.net to get a copy of this message
>jeawoong@yahoo.com >11-Apr-2002 05:41 > >Reviewing an old source written by other person that worked well in an >environment with PHP 3.x version but not worked in 4.x , >I found it can be possibly changed with the length of returned string >of crypt() from 20 to 34. > >Actually the old source defined the password field in Mysql as >VARCHAR(20) and worked well, I found that the output string of crypt() >in PHP 4.x is long as 34, so the comparision with the value stored in >a cookie variable failed in PHP 4.x. > >Am I wrong? > Yes, I was wrong. The length of returned string might be different according to the O.S. Incompatibility might be not because of the version of PHP but because of the change of O.S. The old source was running on Redhat 6.x, and I executed it today on Redhat 7.x. Crypt("") function seems to depend on the O.S. Anyway, this means crypt() is not compatible between O.S. and this means crypt() is not recommened. -- http://www.php.net/manual/en/function.crypt.php http://master.php.net/manage/user-notes.php?action=edit+20655 http://master.php.net/manage/user-notes.php?action=delete+20655 http://master.php.net/manage/user-notes.php?action=reject+20655

« previous php.notes (#29110) next »