I have a very simple link code actually, I use it to try it out:
This is the code:
- Code: Select all
$dbconn = pg_connect("host=localhost port=5432 dbname=DBNAME user=postgres password=XXXXX")
/* if cant connect */
or die('Could not connect: ' . pg_last_error());
/* if connect : */
echo 'connection is success';
If I run this code from the command line it works fine:
But when I run it from the browser it doesn't work properly.
Has anyone encountered this error and knows the solution?