Re: PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server:

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Abdus Samad Ansari <ansarias(at)wbpcb(dot)gov(dot)in>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server:
Date: 2008-05-12 14:44:41
Message-ID: 19583.1210603481@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Abdus Samad Ansari <ansarias(at)wbpcb(dot)gov(dot)in> writes:
> I have setup PHP/Postgres and is running fine upto document root
> i.e. /var/www/html, but when i am calling it through a cgi-bin php file
> it is giving log error as :
> [error] [client 127.0.0.1] PHP Warning: pg_connect(): Unable to connect
> to PostgreSQL server: could not connect to server: \x04\xe6\xe3\xbfPF;

Hmm, so the most useful part of the error message is getting trashed :-(

One possible explanation for that is that you're using a non-thread-safe
libpq in a threaded environment. What PG version is your libpq,
exactly, and how did you build or obtain it?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andy Anderson 2008-05-12 14:59:03 Re: PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server:
Previous Message Harald Armin Massa 2008-05-12 12:26:52 Re: PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: