September 17th, 2003, 08:18 PM
Join Date: Dec 2002
Location: Los Angeles, CA
Time spent in forums: 13 m
Reputation Power: 12
Can't get Postgres to connect with pg_connect()
I installed postgresql on my windows box and I'm trying to get it to connect with PHP.
here is where I'm at:
its installed properly - I created a db and tables using pgsql command line scripts, that works fine.
I un commented out the semi-colon ; in the php.ini file for the pgsql.dll extension
I restarted apache but I keep getting the following msg:
Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: could not connect to server: No connection could be made because the target machine actively refused it. (0x0000274D) Is the server running on host webdev and accepting TCP/IP connections on port 5432? . in c:\www\pgsql\test.php on line 2
$db_handle = pg_connect("host=webdev dbname=test user=jim password=test") or die("Couldn't Connect: ".pg_last_error());
anyone have any thoughts on what it could be? I haven't been able to find anything on it