Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My PostgreSQL is running properly and I can access it via terminal. phpinfo() gives following information regarding the installation:

PDO Driver for PostgreSQL   enabled
PostgreSQL(libpq) Version   9.0.3
Module version  1.0.2
Revision    $Id: pdo_pgsql.c 306939 2011-01-01 02:19:59Z felipe $ 

PostgreSQL Support  enabled
PostgreSQL(libpq) Version   9.0.3
Multibyte character support     enabled
SSL support     enabled
Active Persistent Links     0
Active Links    0 
share|improve this question
What error do you get when you try to connect? –  Nathan Powell Jul 12 '11 at 17:37
I am unable to connect. I use $dbconn = pg_pconnect("host=$global_host port=$global_port dbname=$global_dbname user=$global_user password=$global_password") or die('blah'); to connect and get the error 'blah' –  Jaseem Jul 12 '11 at 17:41
This is not a meaningful error message. You need to check you have the permission to connect to the database server using the specified username with the correct password. Also, you need to make sure the server is listening on the correct IP if you not using localhost as host in the connection string. –  Khaled Jul 12 '11 at 18:27
How do you "access it via terminal" to you Postgresql? Can you post the command and also which user is running the command? –  ghm1014 Jul 12 '11 at 20:48
I am running the server and php codes over localhost.I use the same uname & password. –  Jaseem Jul 13 '11 at 7:15
show 2 more comments

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.