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

From: "Harald Armin Massa" <haraldarminmassa(at)gmail(dot)com>
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 12:26:52
Message-ID: 7be3f35d0805120526s32a5501cg378175cbf2a3f845@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hello,

most crucial information is missing, like:

- your operating system
- your postgresql version
- on which computer is your database server running
- is your database server running

But most likely your problem is that you did not configure PostgreSQL
to listen to TCP/IP-requests. Which again makes it most likely that
you are using a way outdated PostgreSQL Version (that ist < 8.x)

Please update to 8.3.1, and adjust your postgresql.conf, parameter

"listen_addresses (string)"

accordingly.

Best wishes,

Harald

On Mon, May 12, 2008 at 11:58 AM, Abdus Samad Ansari
<ansarias(at)wbpcb(dot)gov(dot)in> wrote:
> PHP Warning: pg_connect(): Unable to connect to PostgreSQL server:
> could not connect to server:
> 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;
>
> what may be the solution.
>
> --Abdus Samad Ansari
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
fx 01212-5-13695179
-
EuroPython 2008 will take place in Vilnius, Lithuania - Stay tuned!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-05-12 14:44:41 Re: PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server:
Previous Message Tino Wildenhain 2008-05-12 12:25:38 Re: PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: