From: Tom Lane <tgl@sss.pgh.pa.us>
To: David <dbree@duo-county.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Connecting via localhost pg-8.0.3
Date: Tue, 14 Jun 2005 23:22:34 -0400
Message-ID: <27553.1118805754@sss.pgh.pa.us> (raw)
In-Reply-To: <20050615022603.GA1615@localhost.localdomain>
References: <20050615022603.GA1615@localhost.localdomain>
David <dbree@duo-county.com> writes:
> I've just upgraded from 7.4.7 to 8.0.3.
On what platform, and how did you build or obtain each of these PG
versions?
> I get the following error if I omit "host=localhost" :
> Warning: pg_connect(): Unable to connect to PostgreSQL server: could
> not connect to server: ΒΈ^@Hv@' Is the server running locally and
> accepting connections on Unix domain socket
> "/var/run/postgresql/.s.PGSQL.5432"? in
> /home/dlb/public_html/test.php
> on line 2
The junk text where a kernel error message ought to be is a known
problem with some older RPM distributions (if running in a non-C
locale) but I thought it was fixed in all known 8.0.3 packagings.
So I'm a tad interested to find where your 8.0.3 came from.
As far as actually solving your problem: it's a good guess that
the problem is a confusion about where the Postgres server socket
lives. The error message shows that the client library is looking
in /var/run/postgresql/, but the normal default for this is /tmp/.
Do you see a socket file at /tmp/.s.PGSQL.5432 ? If so then you
have a libpq.so that came from a different build than the server
came from, and the ultimate answer is to get those two components
in sync.
It could well be that both of the above points are explained if
your PHP is linking to an old version of libpq.so that doesn't
match your PG server.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, dbree@duo-county.com
Subject: Re: Connecting via localhost pg-8.0.3
In-Reply-To: <27553.1118805754@sss.pgh.pa.us>
References: <20050615022603.GA1615@localhost.localdomain> <27553.1118805754@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox