X-Original-To: pgsql-novice-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 493BBD1C4C9; Mon, 28 Jul 2003 04:48:28 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 68394-01; Mon, 28 Jul 2003 01:47:32 -0300 (ADT) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by svr1.postgresql.org (Postfix) with ESMTP id EA7CFD1C4B7; Mon, 28 Jul 2003 01:48:25 -0300 (ADT) Received: from sys2 (12-232-24-239.client.attbi.com[12.232.24.239](untrusted sender)) by attbi.com (rwcrmhc13) with SMTP id <2003072804482501500o58r6e>; Mon, 28 Jul 2003 04:48:25 +0000 Reply-To: From: "bruce" To: , , "'Rod Taylor'" Subject: Re: [PHP] Accessing Postgres db from apache using PHP Date: Sun, 27 Jul 2003 21:53:32 -0700 Message-ID: <000501c354c4$33708080$0301a8c0@Mesa.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <1059359048.8643.13.camel@jester> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/202 X-Sequence-Number: 7737 ok.... i'm still somewhat confused... this is probably a pg_hba.conf issue..... my pg_hba.conf looks like: # TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT #local all trust #host all 127.0.0.1 255.255.255.255 trust # Using sockets credentials for improved security. Not available everywhere, # but works on Linux, *BSD (and probably some others) #local all ident sameuser #local all trust #host all 127.0.0.1 255.255.255.255 trust #host template1 127.0.0.1 255.255.255.255 trust host gforge 127.0.0.1 255.255.255.255 trust i've logged into the server as gforge, and tried to do the psql command -> psql -h localhost gforge psql: FATAL 1: No pg_hba.conf entry for host 127.0.0.1, user gforge, database gforge i've also made sure the php.ini file is correct.... i can do a psql, and then a "\l" to see the gforge database i've tried a number different settings in the pg_hba.conf file... with no luck... i'm willing to bet it's something pretty simple... but i can't see it.. searchs of google haven't shed any light!!! a bottle of your favorite drink to whoever can help!!!! thanks.... bruce bedouglas@earthlink.net ps...i'd even let someone remotely log in if it would help!!! -----Original Message----- From: pgsql-php-owner@postgresql.org [mailto:pgsql-php-owner@postgresql.org]On Behalf Of Rod Taylor Sent: Sunday, July 27, 2003 7:24 PM To: bedouglas@earthlink.net Cc: pgsql-novice@postgresql.org; pgsql-php@postgresql.org Subject: Re: [PHP] Accessing Postgres db from apache using PHP > i then do a: > $tmp = "host=localhost dbname=gforge user=gforge password=gforge"; > $conn = @pg_connect($tmp); Since host=localhost, the client will attempt to connect to the server on 127.0.0.1. By default, TCPIP access is not enabled. To do so, see postgresql.conf, make the change to the tcpip variable, and HUP the server. However, if you leave host=, the client will attempt to connect to the server via the local domain socket which is both enabled by default and should be a touch faster due to more efficient data transmission.