Jump to content

Keeping PHP Database Passwords Secure


edge92

Recommended Posts

Hi, I'm by no means any expert PHP user. As the title says, I need to save important information, namely my MySQL Database Password in a secure manner somehow. I've looked all around for clues to do this, some things that I found were using config files but I don't know much about them and I couldn't find anything on them here or anywhere else. This is really important to me, so any help on this issue would be very much appreciated. Thanks.

Link to comment
https://forums.phpfreaks.com/topic/71597-keeping-php-database-passwords-secure/
Share on other sites

most people store the database host/username/password in a config.php file

ie

<?php
$DB_HOST="localhost";
$DB_USER="root";
$DB_PASS="password";

?>

 

then include that file whenever they use the database and instead of retyping the password they use $DB_PASS,

 

now as the config.php is a php file its parse by the server so the end user can not see that password

 

as for storing members password IN a database, well personally i use MD5+SALT.. more detail if you need it

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.