Hi,
I would like to know how to protect a .php file containing my database password.
If my file includes the follow line:
mysql_connect( "myhost", "user", "my_pwd");
I don't want that others users in the same server can read it.
I thought in set file's owner to 'nobody' with read permission only for 'nobody', but it isn't a solution. Other users can write php code such as:
<?
passthru("cat /home/carlos/public_html/dbaccess.php");
?>
and read it with the browser.
I'll thank you an answer.
(Carlos)
I would like to know how to protect a .php file containing my database password.
If my file includes the follow line:
mysql_connect( "myhost", "user", "my_pwd");
I don't want that others users in the same server can read it.
I thought in set file's owner to 'nobody' with read permission only for 'nobody', but it isn't a solution. Other users can write php code such as:
<?
passthru("cat /home/carlos/public_html/dbaccess.php");
?>
and read it with the browser.
I'll thank you an answer.
(Carlos)