Re: security/setup question: php3 script contains db password, but scriptmust be readable by nobody: any solution?
| From: | Michael Andersson | Date: | Thu, 04 Apr 2002 10:54:45 +0000 |
| Subject: | Re: security/setup question: php3 script contains db password, but scriptmust be readable by nobody: any solution? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18412@lists.php.net to get a copy of this message | ||
you could always use a sepeate file and and then use include
("path/to/whateverfile.php"); with all your dc connection prefererences in
it...
"Dries Verachtert" <dries@ulyssis.org> skrev i meddelandet
news:Pine.LNX.4.21.0005142221560.13249-100000@ace.ulyssis.student.kuleuven.a
c.be...
>
> Hello,
>
> I use apache with php3 and mysql to get some data out of the mysql
database
> like probably lotsa people do. The php3 file contains the password,
because
> it must be able to connect to the database with a valid password. This
file
> also needs to be readable because nobody (the user of the apache
webserver)
> must be able to read the file. At least i think this is the reason because
> without a chmod o+r it doesn't work. There are ca. 200 users on this
> machine.. so i would like to avoid the possibility that other users get
this
> password. Are there any solutions? I already checked the faq and i
couldn't
> find it.
>
> Thanx in advance,
> Dries Verachtert
>