Received: from newman.hartehanks.com (newman.hartehanks.com [204.89.158.3]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0ML7Gl92112; Tue, 22 Jan 2002 16:07:16 -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 g0ML4sL30216; Tue, 22 Jan 2002 16:04:54 -0500 Subject: Re: Not able to connect to server from PHP To: Jeff Self Cc: pgsql-php@postgresql.org, pgsql-php-owner@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 15:54:22 -0500 X-MIMETrack: Serialize by Router on linmail/Harte-Hanks(Release 5.0.9 |November 16, 2001) at 01/22/2002 03:54:22 PM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Archive-Number: 200201/46 X-Sequence-Number: 852 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 cc: Sent by: Subject: Not able to connect to server from PHP pgsql-php-owner@pos tgresql.org 01/22/2002 03:13 PM I'm working on a personnel database for my department. I can connect just fine using 'psql personnel'. I've created a PHP script to get a list of departments, but I'm getting the following error message: Warning: Unable to connect to PostgreSQL server: Peer authentication failed for user 'jeff' in /var/www/personnel/departments.php on line 10 Unable to connect to database. Here's my script: