I'm trying to run a PHP script which has pg_connect($connection_string) and it just crashes my PHP script. I'm running it off of xampp on my computer, here are some facts:
- If I put exit("test"); immediately above the pg_connect statement, it successfully displays the word "test" and terminates the script, so I know that my installation of xampp is working.
- Using phpinfo() I can see that the postgresql extension is indeed loaded.
- I can connect to the database server from pgadmin, so it's not a firewall issue or anything like that.
If I remove this exit statement, the pg_connect statement just hangs. There is no warning displayed or logged, and it never even gets past the function call. I even have:
$db_crm = pg_connect($connection_str);
if (!$db_crm) die("connection failed");
And "connection failed" is never even displayed. My browser just shows "this page cannot be displayed",after timing out.
What in the world could be causing this?