Mysql database password file - where stored?

apps

#1

I am hosting my site for the first time. My reference book for developing my site is Ullman’s “PHP and MySQL for dynamic web sites”. In it he suggests that the file that contains the mysql database password be kept outside of the web site directory structure. How are people doing that with dreamhost? Do they allow files to be stored outside or do you put them inside in a password protected directory?

thanks


#2

If you log into your web directory, you will see three folders. Your web pages are stored in “yourdomain.com” folder. The book is saying to keep those files outside “yourdomain.com” folder. The files can’t be accessed by visitors but you can include the files.

For example, there is a file “example.php” file outside “yourdomain.com” folder. You can include the file like this require_once("…/exmple.php")

Save [color=#CC0000]$97[/color] (max discount) on dreamhost plans by using promo code: [color=#CC0000]97CRAZY[/color]. Sign Up NOW


#3

excellent. thanks.

No wonder I used your promo code. :slight_smile:

Mike


#4

welcome. I’m glad I can help. I learnt a lot in this forum. That’s why I can do something now :stuck_out_tongue:

excellent. thanks. :wink:

and thanks DH for the great discount.

Save [color=#CC0000]$97[/color] (max discount) on dreamhost plans by using promo code: [color=#CC0000]97CRAZY[/color]. Sign Up NOW