note 33195 deleted from ref.pgsql by jsheets

From: Date: Tue, 16 Sep 2003 00:20:02 +0000
Subject: note 33195 deleted from ref.pgsql by jsheets
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-56550@lists.php.net to get a copy of this message
Note Submitter: xp3g@hotmail.com ---- In debian, for example, Apache/PHP runs as www-data, so to access postgreSQL databases and tables: 1. You need to add www-data as PostgreSQL user and use quotes around "www-data": $ su # su - postgres $ createuser "www-data" Shall the new user be allowed to create databases? (y/n) n Shall the new user be allowed to create more new users? (y/n) n CREATE USER $exit #exit $ 2. Since you're not logging on as "www-data", creating databases and tables, you need to grant access to tables you create to www-data: $ psql mydb Welcome to psql 7.3.3, the PostgreSQL interactive terminal. mydb=> grant all on <tablename> to "www-data"; GRANT

« previous php.notes (#56550) next »