incomplete startup packet

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi All,

I am using a PHP script to connect to a PostgreSQL database (tried 7.4
and 8.2) and both of them fail with "LOG: incomplete startup packet" in
postgresql's log.

I have set pg_hba.conf to trust all local connections and hosts from my
subnet (I can connect using pgAdmin III from my PC).

PHP version 5.2.6
Apache 2.0.59

There is nothing fancy about my script, just a simple

        pg_connect("user=postgres password=blah dbname=template1")

Error I get from PHP is:

        Unble to connect to PostgreSQL server: could not get socket error
        status: No such file or directory in <script>

Can someone please advise what I might need to do to resolve this?

~rjw /

Re: incomplete startup packet

Russell Wood wrote:
Quoted text here. Click to load it

Sounds like a Postgres problem, not a PHP one.  Try a Postgres newsgroup.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: incomplete startup packet

Quoted text here. Click to load it

Doesn't sound like a PHP issue - what happens when you try using psql
from the same machine with the same credentials?


Re: incomplete startup packet

Russell Wood schreef:
Quoted text here. Click to load it


Are you maybe running Postgres/Apache/PHP on Windows?
I had trouble with the postgres dlls coming with that PHP version and
used the older ones.
If this is your case (you are on M$) I can try to look up the excact

Erwin Moller

"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare

Site Timeline