Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: PHP/postgreSQL



At 05:14 PM 2/4/06, vince(at)weaktight(dot)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.



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group