Page 1 of 1

Could not connect to database, port 5432?

Posted: Wed Apr 05, 2006 7:53 am
by fidel
Hello, I'm new to this but am not computer illiterate or anything so any advice is good advice.
Here's the problem I'm having:
Warning: pg_connect() [function.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 /public_html/include/db/postgres.inc.php on line 308
Could not connect to database; check your settings.
could anyone enlighten me?

Re: Could not connect to database, port 5432?

Posted: Wed Apr 05, 2006 11:29 am
by garvinhicking
Hi!

Sadly your postgresql server does not allow TCP-IP connetions for PHP. You need to tweak your pgsql pg_hba.conf file to allow TCP/IP connections. You might want to ask a postgresql specific forum on how to setup pgsql for PHP applications, since I only know MySQL better.

Best regards,
Garvin