X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id E9E719DC948 for ; Thu, 9 Feb 2006 17:08:46 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 33577-09 for ; Thu, 9 Feb 2006 17:08:47 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from tomts20-srv.bellnexxia.net (tomts20-srv.bellnexxia.net [209.226.175.74]) by postgresql.org (Postfix) with ESMTP id CAA309DC87F for ; Thu, 9 Feb 2006 17:08:43 -0400 (AST) Received: from acer.sympatico.ca ([65.95.131.146]) by tomts20-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060209210844.NZPM16051.tomts20-srv.bellnexxia.net@acer.sympatico.ca> for ; Thu, 9 Feb 2006 16:08:44 -0500 Message-Id: <5.2.1.1.0.20060209155446.044d0c00@pop6.sympatico.ca> X-Sender: b1wudu74@pop6.sympatico.ca X-Mailer: QUALCOMM Windows Eudora Version 5.2.1 Date: Thu, 09 Feb 2006 16:08:21 -0500 To: pgsql-php@postgresql.org From: Frank Bax Subject: Re: PHP/postgreSQL In-Reply-To: <20060204171435.7lfphylyooggs08c@webmail.weaktight.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.828 required=5 tests=[AWL=-0.612, DNS_FROM_RFC_POST=1.44] X-Spam-Score: 0.828 X-Spam-Level: X-Archive-Number: 200602/24 X-Sequence-Number: 3440 At 05:14 PM 2/4/06, vince@weaktight.com wrote: >I'm running PHP/mySQL via a web hosting service. I require my PHP scripts to >access an external PostgreSQL database. > >I have the PostgreSQL server setup to accept connections from anyone: >I've tested this connection via pgAdminIII and I'm able to connect using this >IP, but when I try to connect via php from the hosted webpage... > >But I'm foiled by: > >Warning: pg_connect(): Unable to connect to PostgreSQL server: could not >connect >to server: Operation timed out Is the server running on host >"24.85.82.xxx" and >accepting TCP/IP connections on port 5432? in >/usr/local/psa/home/vhosts/weaktight.com/httpdocs/mytest.php on line 13 > >Any thoughts or suggestions would be greatly appreciated. I'm not very >experienced with any of this stuff. Your webhosting company must be blocking outgoing requests on port 5432. I was able to connect to your server with your code - no problem.