Jump to content

Php and MYSQL config security


kaliok

Recommended Posts

I was hoping someone could advise me on how to protect my config.inc file.

 

I have a config file with username, password, etc info in it, that I have placed outside of the web directory. I am using a shared hosting package. I have read that because this is on a shared host that there are potential security risks. From what  I have read the way to stop this from being a potential security risk is to use:

 

SetEnv DB_USER "myuser"

SetEnv DB_PASS "mypass"

 

But in order to do this I would need to put an include to the file containing the above data in httpd.conf. The host I am using does not allow access to the httpd.conf.

 

I thought about putting these in the htaccess file but it appears that this still has a potential to be unsafe.

 

Is there another way to protect the config information from prying eyes or to set the Environmental variables and access them in a different place.

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.