Re: PHP Crypt on MacOSX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kris wrote:
I recently moved a site to a MacOSX based Apache/PHP server. Apparently crypt only uses DES. I read somewhere that "there is no way to get it use use MD5", which sounds hard to beleive considering the OS is BSD based.

So.. here is my dilema.. My db contains usernames and passwords. The passwords are MD5 $1ljdslkjdsf$lkjdsaflkjdsf (created by crypt().) So on this new box, new accounts created get DES passwords. I just as well prefer to not see any DES encryptions used in this db.

Any Mac OSX'ers in here that may have a solution? All my users recreating new passwords for their account is not an option.

Thanks for any ideas,

Kris
Can't you just use the db's (i assume you use MySQL, most do) built-in MD5 function?

SELECT id, username FROM users WHERE username LIKE 'myuser' AND password = MD5('mypass') LIMIT 1

--
Daniel Schierbeck

Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/register&r=6584

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux