Hi.I have php4 and Postgresql installed in my linux machine.Both of them are running just fine.When i compliled PHP,i did so with psql.Now my problem is that i want to write a code using php which connects to my Postgre database.I got some tutorial which explains how to its as follows:
$conn = pg_connect( "host=localhost user=username password=password dbname=phonelist"); doing the neccessary replacements.When i do it,i get the following error:
Warning: Unable to connect to PostgreSQL server: PQconnectPoll() -- connect() failed: Connection refused Is the postmaster running (with -i) at 'localhost' and accepting connections on TCP/IP port 5432? in /wwwdocs/html/connect.php3 on line 7
I think the problem is coming in coz of the way i start my postgre.I start it as follows
/usr/local/pgsql/bin/pg_ct1 - /home/postgres/database start.
Please tell me what am doing wrong.
Thanks alot
$conn = pg_connect( "host=localhost user=username password=password dbname=phonelist"); doing the neccessary replacements.When i do it,i get the following error:
Warning: Unable to connect to PostgreSQL server: PQconnectPoll() -- connect() failed: Connection refused Is the postmaster running (with -i) at 'localhost' and accepting connections on TCP/IP port 5432? in /wwwdocs/html/connect.php3 on line 7
I think the problem is coming in coz of the way i start my postgre.I start it as follows
/usr/local/pgsql/bin/pg_ct1 - /home/postgres/database start.
Please tell me what am doing wrong.
Thanks alot