Received: from visi.net (arsenal.visi.net [206.246.194.60]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0MLIul99531 for ; Tue, 22 Jan 2002 16:18:56 -0500 (EST) (envelope-from jself@ci.newport-news.va.us) Received: from [216.54.6.254] (HELO localhost.localdomain) by visi.net (CommuniGate Pro SMTP 3.5) with ESMTP id 12544662; Tue, 22 Jan 2002 16:17:48 -0500 Subject: Re: Not able to connect to server from PHP From: Jeff Self To: timothy_maguire@hartehanks.com Cc: pgsql-php@postgresql.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.1 Date: 22 Jan 2002 16:18:48 -0500 Message-Id: <1011734328.16830.4.camel@personnel_test> Mime-Version: 1.0 X-Archive-Number: 200201/47 X-Sequence-Number: 853 Ok, I tried this and this is the error message I get now: Warning: Unable to connect to PostgreSQL server: FATAL 1: user "www-data" does not exist in /var/www/personnel/include/database.inc on line 9 Could not connect to database. www-data is the user and group for apache. I don't know what to make of this. Here's my database.inc file: On Tue, 2002-01-22 at 15:54, timothy_maguire@hartehanks.com wrote: > > When I connect I don't like to use the user name attribute. You might also > want to try the port attribute. > > Try something like this: > > $conn =pg_connect("host=localhost port=5432 dbname=personnel") or die > ("unable to connect to Internal DB"); > > Tim. > > Timothy P. Maguire > Web Developer II > Harte-Hanks > 978 436 3325 -- Jeff Self Information Technology Analyst Department of Personnel City of Newport News 2400 Washington Ave. Newport News, VA 23607 757-926-6930