PHP POstgresql Apache & Linux

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Megrain
Forum Newbie
Posts: 8
Joined: Thu Aug 11, 2005 4:48 am
Location: South Africa

PHP POstgresql Apache & Linux

Post 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.
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

Do you have error_reporting turned on? Normally that should help tell you what the error is.
Megrain
Forum Newbie
Posts: 8
Joined: Thu Aug 11, 2005 4:48 am
Location: South Africa

Error Reporting

Post 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.
Post Reply