RE: [PHP] strange crypt() problem
| From: | Sævar Öfjörð | Date: | Thu, 19 Jun 2003 22:56:21 +0000 |
| Subject: | RE: [PHP] strange crypt() problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-152253@lists.php.net to get a copy of this message | ||
Well, if you don't find another solution for this, you could generate
random passwords for each member and mail them to them. Then you would
md5() them and update the DB with new md5()'ed passwords... This is not
the easy way out so I hope someone finds out why the crypt() is behaving
strangely.
Sævar - ICELAND
-----Original Message-----
From: Huzz [mailto:huzz@bangladeshimatch.com]
Sent: 19. júní 2003 22:43
To: php-general@lists.php.net
Subject: Re: [PHP] strange crypt() problem
I already have about 1000 members their password crypted using crypt();
would they able to login using their password or they have to change it
again??
Thanks
"SævË Ölêöyp" <ofjord@simnet.is> wrote in message
news:001501c336ad$d70cac80$0100a8c0@dmc...
Try using md5() instead because it is more widely supported than crypt()
and it leaves no room for errors.
Hope it helps,
Sævar ICELAND
-----Original Message-----
From: Huzz [mailto:huzz@bangladeshimatch.com]
Sent: 19. júní 2003 21:43
To: php-general@lists.php.net
Subject: [PHP] strange crypt() problem
I have this bit of code to crypt user password in user registration as
shown
below.
$cryptpass=crypt($makepass);
which generated crypted password like eg 37Q9fppLHc4fQ with php 4.0
And am using the codes below to check for valid login..
// $pass - from login page
// $dbpass - from the database
$pass=crypt($pass,substr($dbpass,0,2));
}
if (strcmp($dbpass,$pass)) {
return(0);
}
Recently i have moved the same file to a new server with php 4.3.1 the
problem is the same piece of codes above generates completely differen
crypted value eg.$1$RjZHv7qx$h/L9ZUNT48rilHB6fGoMP/ .. hence the login
codes above does not work... :(
Please someone tell me that i am not going mad....
please help
huzz
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php