Re: Error - when trying to connect to postgresql

From: Date: Mon, 21 Jul 2003 15:01:17 +0000
Subject: Re: Error - when trying to connect to postgresql
Groups: php.general 
Request: Send a blank email to php-general+get-156077@lists.php.net to get a copy of this message
When I try to connect to postresql with my php script below I got hhis eror: I can insert into the table from psql. Please help Thanks, ----------------------------------------------------------------------------------------------------------- Warning: pg_exec() query failed: ERROR: invention: permission denied in /home/pptun/public_html/invention.php on line 9 ----------------------------------------------------------------------------------------------------------- $conn = pg_connect("dbname=pptun port=5432");
My first guess is that your problem comes from the fact that pg_connect is missing at least a username and password. From http://us4.php.net/pg_connect : $dbconn3 = pg_connect ("host=sheep port=5432 dbname=mary user=lamb password=foo"); //connect to a database named "mary" on the host "sheep" with a username and password Good luck peter -- Peter Torraca peter@torraca.net <><

« previous php.general (#156077) next »