crypt()

From: Date: Wed, 07 Aug 2002 16:06:45 +0000
Subject: crypt()
Groups: php.general 
Request: Send a blank email to php-general+get-111530@lists.php.net to get a copy of this message
I am having a strange problem with the crypt function. I have been using crypt to generate passwords for a .htaccess like this; $cpassword = crypt($password); This has been working fine for the past couple of weeks. But this morning for some reason it stopped working. I made no changes to the script, I am however on a shared host so something may have changed on the server (I am just not sure what). Anyway, in trying to figure out what happened I wrote a script that does the same thing in perl to try to isolate the problem. When I crypt the password with perls version crypt (in the cgi script) it works. Here are the two encrypted passwords I have been using for testing. The password is shadow. The perl output from crypt is Md/w17y56z8Xc. The php output is from crypt is $1$kx4aditc$xkrhdSA3zTQY21Frtp51e0 . The perl output works in my .htaccess file and the php version used to but no longer does. It looks like php is using a different algorithm then php. Any help would be appreciated. Mike Fifield Charles Schwab & Co, Inc. WARNING: All e-mail sent to or from this address will be received by the Charles Schwab corporate e-mail system and is subject to archival and review by someone other than the recipient.

« previous php.general (#111530) next »