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

From: Andy Anderson <aanderson(at)amherst(dot)edu>
To: 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:59:03
Message-ID: 81591F02-0481-4B90-AF97-A7925BD6E628@amherst.edu
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;

I don't know how the error message is structured, but if
"\x04\xe6\xe3\xbfP" refers to the host, perhaps the connection string
you are handing to pg_connect() is trashed. What is the actual code
you are using for this call?

-- Andy

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2008-05-12 15:09:29 Re: How to create a function with multiple RefCursor OUT parameters
Previous 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: