zart
10-13-2006, 10:57 PM
I am unable to connect to PostgreSQL using php;
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?
I have created database and users in cpanel and can connect with phpPgAdmin.
phpPgAdmin shows the database and user okay and the privileges as I would expect.
I have tried this script on my local setup and it works okay.
Is PostgreSQL running on locahost or perhaps another machine?
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?
I have created database and users in cpanel and can connect with phpPgAdmin.
phpPgAdmin shows the database and user okay and the privileges as I would expect.
I have tried this script on my local setup and it works okay.
Is PostgreSQL running on locahost or perhaps another machine?