note 20143 added to function.mysql-connect
| From: | filenotfound404error at yahoo dot com | Date: | Sun, 24 Mar 2002 05:09:30 +0000 |
| Subject: | note 20143 added to function.mysql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28138@lists.php.net to get a copy of this message | ||
If you install PHP as a CGI (http://www.php.net/manual/en/security.cgi-bin.php) and then set up
Apache with suexec enabled (http://httpd.apache.org/docs/suexec.html), you can set your PHP
scripts' permissions to 700, thereby making it more difficult for other users of the system to
get at your MySQL passwords. I like this setup anyway, because under it a user's script runs
with the user's ID. Scripts thus inherit the user's permissions and can read and write
files without setting the files' permissions so as to open the files up to other users -- handy
for the user and the sysop, from a security point of view.
Sure, running PHP as a CGI isn't as efficient as running it as an Apache module (according to
my informal benchmarks, the former setup can only handle about one third as many concurrent users as
the latter), but for many people, the added security is worth the performance trade off.
I certainly think it is.
--
http://www.php.net/manual/en/function.mysql-connect.php
http://master.php.net/manage/user-notes.php?action=edit+20143
http://master.php.net/manage/user-notes.php?action=delete+20143
http://master.php.net/manage/user-notes.php?action=reject+20143