[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Where to put PHP database connection info fileon RaQ3?



le 1.11.2001 14:59, Steve Werby à steve-lists@xxxxxxxxxxxx a écrit :

> "Marco Baurdoux" <linux@xxxxxxxxxxxxx> wrote:
>> put the file outside of the web directory and create a file with only read
>> privileges for the owner of the PHP script !!
> 
> If you're implying that will prevent others from reading the file, you're
> correct.  However, I'm afraid that your solution will only work if PHP is
> being run as a CGI instead of as an Apache module.  When run as an Apache
> module, the file needs to be readable by user httpd (user Apache runs as),
> otherwise PHP can't access the file.  <frown>
> 
Clever thinking Watson, you will go far as detective ( Sherlock Holmes)
Yep, you're 1000% right :-))

So if you have PHP compiled as a shared module, put the password file
outside of your webtree, let it's name start with .ht so that the webserver
will never ever download it. and finally make it world readable.

Watson, if you have any additional comments they are more then welcome,
share your knowledge with us.