note 16843 deleted from function.mysql-connect by jimw

From: Date: Sat, 08 Dec 2001 19:49:56 +0000
Subject: note 16843 deleted from function.mysql-connect by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22131@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.

« previous php.notes (#22131) next »