Received: from newman.hartehanks.com (newman.hartehanks.com [204.89.158.3]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0MLO0l01800 for ; Tue, 22 Jan 2002 16:24:00 -0500 (EST) (envelope-from timothy_maguire@hartehanks.com) Received: from linmail.hartehanks.com (linmail.hartehanks.com [172.21.116.31]) by newman.hartehanks.com (8.11.2/8.11.2) with ESMTP id g0MLLcL32601; Tue, 22 Jan 2002 16:21:38 -0500 Subject: Re: Not able to connect to server from PHP To: Jeff Self Cc: pgsql-php@postgresql.org X-Mailer: Lotus Notes Release 5.0.6a January 17, 2001 Message-ID: From: timothy_maguire@hartehanks.com Date: Tue, 22 Jan 2002 16:11:06 -0500 X-MIMETrack: Serialize by Router on linmail/Harte-Hanks(Release 5.0.9 |November 16, 2001) at 01/22/2002 04:11:06 PM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Archive-Number: 200201/48 X-Sequence-Number: 854 on my server, I have 'http' registered as a user for my database. you can try that. Or you can add the user=username password=password to the pg_connect() function. Tim. Timothy P. Maguire Web Developer II Harte-Hanks 978 436 3325 Jeff Self cc: pgsql-php@postgresql.org Subject: Re: Not able to connect to server from PHP 01/22/2002 04:18 PM 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 HARTE- HANKS PRIVILEGED AND CONFIDENTIAL INFORMATION- if you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein and should delete this message.