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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.