Page 1 of 1

PHP POstgresql Apache & Linux

Posted: Thu Aug 11, 2005 5:16 am
by Megrain
I have a PHP Problem or db.

Here is my installtion

Fedora core 2 With apache & php support of mysql.
loaded php_gpsql module and tested it works
http://www.dlinktech.co.za/dlink/pgs.php

Aslo here is the info link
http://www.dlinktech.co.za/dlink/pgsql.php

pg_hba.conf
http://www.dlinktech.co.za/dlink/pg_hba.conf

postgresql
http://www.dlinktech.co.za/dlink/postgresql.conf

I used pgadmin 3 and can connect to the server.

here is the connection string I used
<?php
$db_handle=pg_connect("dbname=#### username=###### password=######");
if ($db_handle) {
echo 'Connection attempt succeeded.';
} else {
echo 'Connection attempt failed.';
}
pg_close($db_handle);
?>
http://www.dlinktech.co.za/dlink/pgsql2.php

Please help What can be wrong ?
I did the same setup on a second server also FC2 with everything the same and it connected.
but if I copy the .conf to the dlinktech.co.za the problem is still there.

Posted: Thu Aug 11, 2005 7:30 am
by nielsene
Do you have error_reporting turned on? Normally that should help tell you what the error is.

Error Reporting

Posted: Fri Aug 12, 2005 2:05 am
by Megrain
Thanx Found the problem the pgsql didn't accept it found a post with a restart command after I enter it the server worked even after reboots.