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 939739DC998 for ; Sat, 4 Feb 2006 18:21:18 -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 53772-08 for ; Sat, 4 Feb 2006 18:21:19 -0400 (AST) X-Greylist: delayed 00:06:40.272935 by SQLgrey- Received: from hurricane.stormweb.net (hurricane.stormweb.net [65.39.129.23]) by postgresql.org (Postfix) with ESMTP id 710CC9DC9F8 for ; Sat, 4 Feb 2006 18:21:14 -0400 (AST) Received: (qmail 30501 invoked from network); 4 Feb 2006 17:14:35 -0500 Received: from localhost (127.0.0.1) by localhost with SMTP; 4 Feb 2006 17:14:35 -0500 Received: from S0106001310f09c28.vc.shawcable.net (S0106001310f09c28.vc.shawcable.net [24.85.82.132]) by webmail.weaktight.com (Horde MIME library) with HTTP for ; Sat, 04 Feb 2006 17:14:35 -0500 Message-ID: <20060204171435.7lfphylyooggs08c@webmail.weaktight.com> Date: Sat, 04 Feb 2006 17:14:35 -0500 From: vince@weaktight.com To: pgsql-php@postgresql.org Subject: PHP/postgreSQL MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.3) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.55 required=5 tests=[NO_REAL_NAME=0.55] X-Spam-Score: 0.55 X-Spam-Level: X-Archive-Number: 200602/16 X-Sequence-Number: 3432 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: [pg_hba_conf] # TYPE DATABASE USER CIDR-ADDRESS METHOD host all all 0.0.0.0/0 trust [--] 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... My php script is simple: \n"; } else { print pg_last_error($dbconn); exit; } pg_close($dbconn); ?> 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. Thanks.