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 EFC4BD1B95D for ; Wed, 3 Sep 2003 18:00:54 +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 27203-05 for ; Wed, 3 Sep 2003 15:00:45 -0300 (ADT) Received: from hosting.commandprompt.com (214.commandprompt.com [207.173.200.214]) by svr1.postgresql.org (Postfix) with ESMTP id 2BC1ED1B8C9 for ; Wed, 3 Sep 2003 15:00:43 -0300 (ADT) Received: from commandprompt.com (dsl093-077-251.sea2.dsl.speakeasy.net [66.93.77.251]) (authenticated) by hosting.commandprompt.com (8.11.6/8.11.6) with ESMTP id h83I0hC29826 for ; Wed, 3 Sep 2003 11:00:43 -0700 Message-ID: <3F562C48.1020404@commandprompt.com> Date: Wed, 03 Sep 2003 11:00:40 -0700 From: Robby Russell Organization: Command Prompt, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030727 Thunderbird/0.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-php@postgresql.org Subject: Re: pg_connect problem References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/7 X-Sequence-Number: 2284 Edric Bulalacao wrote: > Thank you for the quick reply. Looks like all the lines in my > postgresql.conf file are all commented out. > > I will uncomment the tcpip_socket and port lines lines to see if it works: > > No problem. I've run into this on several occasions when I'm setting up a new server and forget to make that one minor little change. It's a good default security setting, however it adds one extra little step for us. heh -Robby > # Connection Parameters > # > #tcpip_socket = true > #ssl = false > > #max_connections = 32 > #superuser_reserved_connections = 2 > > #port = 5432 > #hostname_lookup = false > #show_source_port = false > > > > -----Original Message----- > From: Robby Russell [mailto:rrussell@commandprompt.com] > Sent: Wednesday, September 03, 2003 10:48 AM > To: Edric Bulalacao > Subject: Re: [PHP] pg_connect problem > > Edric Bulalacao wrote: > >>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! > > >>Can anyone tell me what I'm doing wrong? Thanks. > > > Look at your postgres.conf file. > > Is TCP/IP on? > > tcpip_socket = true > > > > -- > Robby Russell, | Sr. Administrator / Lead Programmer > Command Prompt, Inc. | http://www.commandprompt.com > rrussell@commandprompt.com | Telephone: (503) 222.2783