RE: [PHP] How can I secure database passwords used by PHP webpages
| From: | Chris W. Parker | Date: | Wed, 02 Mar 2005 16:51:04 +0000 |
| Subject: | RE: [PHP] How can I secure database passwords used by PHP webpages | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-209813@lists.php.net to get a copy of this message | ||
Dan Tappin <mailto:dan@orourke.ca>
on Wednesday, March 02, 2005 7:32 AM said:
> The best way is to not store the password at all.
>
> Store a hash of the password like this:
>
> INSERT INTO users SET pass = MD5('password');
>
> Now not knowing how you authenticate those passwords this might not
> work.
>
> If it's an internal web page via PHP all you do is MD5 the users
> supplied password and compare to you DB.
But that doesn't help in this situation because the OP is not referring
to passwords for users of the website but rather the password(s) for
MySQL so that the application can access the db.
Chris.