This forum is no longer active. Please post your questions to our new community site

Forums WAPPStack

Database connection problem

Subscribe to Database connection problem 2 post(s), 2 voice(s)

 
Avatar achin 1 post

Hi,

I am new to Wappstack, My PhppgAdmin is running well. I made a table in the default database and populated it with some data.

In order to test the connection I made a “test.html” file as follows and put it in the htdocs folder. I am trying to run the URL http://localhost/test.html but nothing is getting displayed. Please help!!!

<?php $dbconn = pg_connect(“host=localhost dbname=postgres user=postgres password=achin”) or die(“Could not connect”); $stat = pg_connection_status($dbconn); if ($stat === PGSQL_CONNECTION_OK) { echo ‘Connection status ok’; } else { echo ‘Connection status bad’; }

?>

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Could you try to specify the port? Could you check the Apache log file: your_installdir/apache2/logs/error_log ?

Forums WAPPStack