Re: Re: PHP Crypt on MacOSX

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

 



I use md5 all the time and OS X is my web development staging environment! I write and test all my scripts on OS X and then send off to the server. I don't use crypt, but I have never seen any problems going between the two. apache, php, mysql, rsync, ssh, scp, everything *nixy plus a nice interface makes OS X the ideal web development environment - at least for me.

Not only can MySQL do md5, there is an md5 function in php which I've used many times under OS X no problem:
http://us2.php.net/md5


If that wasn't enough, OS X ships with an md5 binary that's in the usual file path so typing "md5" in the command line will pull it up and "man md5" gives all the info you could need on using it. I don't encourage the use of the command line version of md5 for php because it will be slower than the built in php function, but it is there!

-Galen

On Oct 25, 2004, at 10:38 AM, Daniel Schierbeck wrote:

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




-- 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