X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DE5BB475EF0 for ; Tue, 8 Apr 2003 03:35:34 -0400 (EDT) Received: from pop015.verizon.net (pop015pub.verizon.net [206.46.170.172]) by postgresql.org (Postfix) with ESMTP id 0E7584758E6 for ; Tue, 8 Apr 2003 03:35:34 -0400 (EDT) Received: from RavChaim ([151.202.82.144]) by pop015.verizon.net (InterMail vM.5.01.05.27 201-253-122-126-127-20021220) with ESMTP id <20030408073534.VHIH1728.pop015.verizon.net@RavChaim> for ; Tue, 8 Apr 2003 02:35:34 -0500 Content-Type: text/plain; charset="us-ascii" From: mlaks To: pgsql-admin Subject: trouble connecting to Postgresql Database via apache-perl script on localhost ? pg_hba.conf issue Date: Tue, 8 Apr 2003 03:11:18 -0400 User-Agent: KMail/1.4.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200304080311.18970.mlaks@bellatlantic.net> X-Authentication-Info: Submitted using SMTP AUTH at pop015.verizon.net from [151.202.82.144] at Tue, 8 Apr 2003 02:35:34 -0500 X-Spam-Status: No, hits=-11.7 required=5.0 tests=BAYES_10,RCVD_IN_OSIRUSOFT_COM,USER_AGENT_KMAIL autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/79 X-Sequence-Number: 8234 Hi, I am trying to do simple adminstration tasks on a postgresql database on=20 the localhost via my apache server and a cgi-perlscript. The perlscript by itself works fine and connects to the database as=20 the user "wustl". It uses Perl DBI to talk to the database. But it wont work with apache i get error messages on my pg database such as=20 bash-2.05a$=20 FATAL 1: IDENT authentication failed for user "nobody" or FATAL 1: IDENT authentication failed for user "wustl" pg_ctl s whether i use the name "wustl" (the creator of the database) or=20 "nobody" (in a fit of hubris and insanity i tried ot let "nobody" be a=20 superuser on postgresql I cant figure out how to set up the pg_hba.conf file to work. I have tried using the settings ##### local all ident sameuser host all 127.0.0.1 255.255.255.255 trust ####### or=20 ######### local all ident sameuser host all 127.0.0.1 255.255.255.255 ident sameuser ####### the connection string of my perlscript was my $conn =3D DBI->connect ("DBI:Pg:dbname=3DLTA_IDB","wustl","") or die("Cannot connect: $DBI::errstr"); $patname =3D $conn->quote( $patname); or my $conn =3D DBI->connect ("DBI:Pg:dbname=3DLTA_IDB","nobody","") or die("Cannot connect: $DBI::errstr"); $patname =3D $conn->quote( $patname);=20 depending upon my try. thanks Mitchell Laks