Reputation: 2928
I installed PostgreSQL version 8.3.19 on windows server 2003. After configuration, I can access locally (from a php script) but not remotely (from another similar php script, from another machine).
1) NAT is configured and tested for the port 5432
2) Firewall authorises the application
3) I set the pg_hba.conf file:
host all all 0.0.0.0/0 md5
4) I set the postgresql.conf:
listen_addresses='*'
5) I created a role with pgAdminIII for the access from an application. I declared him superuser (just for the tests) and named him TOTO
6) My local script is:
$con=pg_connect("host=localhost port=5432 user=TOTO password=PW dbname=test")
7) My remote script is:
$con=pg_connect("host=myhostname port=5432 user=TOTO password=PW dbname=test")
I don't see what I could forget. Could you light me ?
Upvotes: 3
Views: 7052
Reputation: 22972
If you are getting timeouts then as mask8 says it's probably firewall configuration problems. See if you can connect to your target IP from the server itself. Also enable connection logging in postgresql's config.
Oh, and unless you really have to use that version, install 9.1, 8.3 is due for retirement fairly soon.
Upvotes: 2