X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 22A16D1B95D for ; Wed, 3 Sep 2003 17:59:12 +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 27580-05 for ; Wed, 3 Sep 2003 14:58:42 -0300 (ADT) Received: from mail.kolareal.net (unknown [200.48.62.162]) by svr1.postgresql.org (Postfix) with ESMTP id A74DBD1B8E0 for ; Wed, 3 Sep 2003 14:58:23 -0300 (ADT) Received: from mail.kolareal.net (localhost.localdomain [127.0.0.1]) by mail.kolareal.net (8.12.8/8.12.8) with ESMTP id h83I0LnS017305 for ; Wed, 3 Sep 2003 13:00:22 -0500 Received: (from apache@localhost) by mail.kolareal.net (8.12.8/8.12.8/Submit) id h83I0LsU017303; Wed, 3 Sep 2003 13:00:21 -0500 X-Authentication-Warning: mail.kolareal.net: apache set sender to nzegarra@kolareal.net using -f Received: from 200.48.62.162 (proxying for 192.168.1.16) (SquirrelMail authenticated user nzegarra) by mail.kolareal.net with HTTP; Wed, 3 Sep 2003 13:00:21 -0500 (PET) Message-ID: <54128.200.48.62.162.1062612021.squirrel@mail.kolareal.net> In-Reply-To: References: Date: Wed, 3 Sep 2003 13:00:21 -0500 (PET) Subject: Re: pg_connect problem From: nzegarra@kolareal.net To: pgsql-php@postgresql.org User-Agent: SquirrelMail/1.4.1-2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/6 X-Sequence-Number: 2283 in your pg_hba.conf must set a line with the follow: local all all 127.0.0.1 255.255.255.255 trust local all all IP.OF.YOUR.MACHINE YOUR.GATEWAY trust and in your postgresql.conf must set the port = 5432 without the comment restart the postgresql and it must work Regards Nilson > I’m a PHP/PostGRE newbie. I’m getting this error: > > Warning: pg_connect(): Unable to connect to PostgreSQL server: could not > connect to server: Connection refused Is the server running on host > localhost and accepting TCP/IP connections on port 5432? . in > /export/home/tsc/a/delete-action.phtml on line 156 > Couldn't make a connection! > > This is the code I’m trying to run: > $connection = pg_connect("host=localhost dbname=address user=address > password=address"); > > This is my pg_hba.conf > local all all password > > This is the output of “netstat –an | grep 5432” > unix 2 [ ACC ] STREAM LISTENING 27649 > /tmp/.s.PGSQL.5432 > > I’m able to do “psql –u address” and supply and username and password as > any > Unix user defined in the system. > > > Can anyone tell me what I’m doing wrong? Thanks. > >