OK to chown www-data.www-data?
Gilles Ganault
gilles.ganault at free.fr
Tue Jul 27 16:49:11 MSD 2010
On Tue, 27 Jul 2010 14:33:31 +0200, Gilles Ganault
<gilles.ganault at free.fr> wrote:
>Sent the message too soon: The PHP5 script can create an empty
>datafile, but can't do anything with it, with no error message
Found it: "table" is a reserved name so cannot be used as a name to
table:
============
#BAD $dbh->exec("CREATE TABLE IF NOT EXISTS table (id INTEGER PRIMARY
KEY AUTOINCREMENT, name VARCHAR(255))");
#BAD $dbh->exec("INSERT INTO table (name) VALUES ('dummy')");
$dbh->exec("CREATE TABLE IF NOT EXISTS mytable (id INTEGER PRIMARY KEY
AUTOINCREMENT, name VARCHAR(255))");
$dbh->exec("INSERT INTO mytable (name) VALUES ('dummy')");
============
The file is created as www-data.www-data so it looks like all PHP
files are run as this user and any file those scripts create are also
owned by www-data.www-data.
HTH,
More information about the nginx
mailing list