Connecting via localhost pg-8.0.3

From: David <dbree(at)duo-county(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Connecting via localhost pg-8.0.3
Date: 2005-06-15 02:26:03
Message-ID: 20050615022603.GA1615@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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: ¸^(at)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.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Amrit Angsusingh 2005-06-15 03:00:13 Blob error after backup and restore [database > 5.5 Gb.]
Previous Message Bruce Momjian 2005-06-14 18:45:07 Re: max_fsm_pages