I have been attempting to connect to a postgres database through a php script for a couple of days now, and I am having a difficult time of it.
Specifically, when I attempt to connect to the database, it won't make the connection, but does not return an error message. Here's my script (code is available in a link on the page): (<!-- m --><a class="postlink" href="http://swamp.usask.ca/tests/php/db.php">http://swamp.usask.ca/tests/php/db.php</a><!-- m -->).
The database should be installed correctly, since I am able to connect to it through a perl cgi script: (<!-- m --><a class="postlink" href="http://swamp.usask.ca/cgi-bin/tests/db.cgi">http://swamp.usask.ca/cgi-bin/tests/db.cgi</a><!-- m -->).
Here's the output of running the postmaster at debug level 4: (<!-- m --><a class="postlink" href="http://swamp.usask.ca/tests/php/db-output.html">http://swamp.usask.ca/tests/php/db-output.html</a><!-- m -->).
I've granted the UID that the webserver runs under ALL privelages, as well as the user db, which it should be connecting as. I think that I've also got my pg_hba.conf file setup correctly: (<!-- m --><a class="postlink" href="http://swamp.usask.ca/tests/php/pg_hba.conf.html">http://swamp.usask.ca/tests/php/pg_hba.conf.html</a><!-- m -->).
Any insights into this problem would be greatly appreciated!
thanks,
shane doucette.
Specifically, when I attempt to connect to the database, it won't make the connection, but does not return an error message. Here's my script (code is available in a link on the page): (<!-- m --><a class="postlink" href="http://swamp.usask.ca/tests/php/db.php">http://swamp.usask.ca/tests/php/db.php</a><!-- m -->).
The database should be installed correctly, since I am able to connect to it through a perl cgi script: (<!-- m --><a class="postlink" href="http://swamp.usask.ca/cgi-bin/tests/db.cgi">http://swamp.usask.ca/cgi-bin/tests/db.cgi</a><!-- m -->).
Here's the output of running the postmaster at debug level 4: (<!-- m --><a class="postlink" href="http://swamp.usask.ca/tests/php/db-output.html">http://swamp.usask.ca/tests/php/db-output.html</a><!-- m -->).
I've granted the UID that the webserver runs under ALL privelages, as well as the user db, which it should be connecting as. I think that I've also got my pg_hba.conf file setup correctly: (<!-- m --><a class="postlink" href="http://swamp.usask.ca/tests/php/pg_hba.conf.html">http://swamp.usask.ca/tests/php/pg_hba.conf.html</a><!-- m -->).
Any insights into this problem would be greatly appreciated!
thanks,
shane doucette.