note 14000 added to function.mysql-connect.php
| From: | hexar at hexar dot net | Date: | Thu, 12 Jul 2001 20:39:18 +0000 |
| Subject: | note 14000 added to function.mysql-connect.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15303@lists.php.net to get a copy of this message | ||
A better way to protect your password/data with PHP and MySQL, if you don't need write access,
is to have a new user, such as "nobody" (which is often the default Apache user processing
your PHP anyway) who has read-only access to your database tables--and connect using nobody and no
password.
Another note: Say you want your script to write some files to one of your directories, but you
don't want the directory world-writable. Simply make the directory's group
"nobody" and chmod it 775. This way, "nobody" will have rw access, but nobody
else.
> It may be obvious, but scripts that
> use the mysql_connect function
> shouldn't be saved with a .txt
> extension if you want to keep your
> password secret.
http://www.php.net/manual/en/function.mysql-connect.php