From: David <dbree@duo-county.com>
To: pgsql-admin@postgresql.org
Subject: Connecting via localhost pg-8.0.3
Date: Tue, 14 Jun 2005 21:26:03 -0500
Message-ID: <20050615022603.GA1615@localhost.localdomain> (raw)
I'm not sure to what list this question belongs, but here goes.
I've just upgraded from 7.4.7 to 8.0.3. All seems to have upgraded well
but I've stumbled across one thing I don't understand. It now seems
that I have to include host=localhost in the pg_connect params from a
php script, whereas these same scripts without this specification worked
with 7.4.7.
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
I notice that it appears from the above that without the host
specification, the server name comes across as garbage. Again, adding
the host specification eliminates the error.
In my postgresql.conf file, I have the line:
listen_addresses = '*'
the php manual says that you need the '-i' option, but from the 8.0-
docs, it states that the -i option is deprecated and the above line
takes care of it.
This is no show-stopper, just a matter of editing a few lines in my php
files, but I'm just wondering if it's a config parameter on my part or a
change in postgres' default behavior. My php (4.3.10) hasn't been
upgraded for some time, so it shouldn't be in php.
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: dbree@duo-county.com
Subject: Re: Connecting via localhost pg-8.0.3
In-Reply-To: <20050615022603.GA1615@localhost.localdomain>
References: <20050615022603.GA1615@localhost.localdomain>
* 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