note 16843 added to function.mysql-connect
| From: | suso at suso dot org | Date: | Thu, 15 Nov 2001 16:45:56 +0000 |
| Subject: | note 16843 added to function.mysql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-20878@lists.php.net to get a copy of this message | ||
In the above example where spamjunkie006@yahoo.com showed a way to safely store the cleartext
password for a mysql database, it's important to note that this should only be done when
running the mod_php module in safe mode. When I developed this method of storing the password in a
mysqlinfo file, it was for a shared webserver where there was the possibility for others to read
each others source code.
When normally running a shared webserver with PHP and perhaps shell access, there is the possibility
that some other user will just read another's world readable files through the shell or through
a CGI script. But by using suexec for CGIs and running PHP in safe mode, the proper permissions on
the home directory or private directory will let the webserver in for files owned by that user, but
keep all other users out.
This is part of a larger shared webserver design that I'm working on documenting. You will be
able to check it out at http://suso.suso.org/ when it's
finished.
--
http://www.php.net/manual/en/function.mysql-connect.php
http://master.php.net/manage/user-notes.php?action=edit+16843
http://master.php.net/manage/user-notes.php?action=delete+16843
http://master.php.net/manage/user-notes.php?action=reject+16843