Re: Problem connecting with PHP in OS X - Mailing list pgsql-admin

From Antti Haapala
Subject Re: Problem connecting with PHP in OS X
Date
Msg-id Pine.GSO.4.44.0303081800300.27128-100000@paju.oulu.fi
Whole thread Raw
In response to Problem connecting with PHP in OS X  (Eric Marsh <emarsh@mac.com>)
List pgsql-admin
On Sat, 8 Mar 2003, Eric Marsh wrote:

> Good Morning,
>
> Does anyone have any idea why host=localhost is breaking my connection?
> Is there a configuration value I should be setting?

I don't know about PHP but usually specifying explicitly host=localhost
will try to connect via TCP/IP on localhost:5432, while default action
is to connect to local "unix domain" socket.

Localhost itself is a regular hostname, which usually should map to
loopback ip 127.0.0.1.

Check out PostgreSQL documentation for pg_hba.conf to allow TCP/IP
connections from localhost.

Also, postgresql.conf should contain line

    tcpip_socket = on

--
Antti Haapala



pgsql-admin by date:

Previous
From: Eric Marsh
Date:
Subject: Problem connecting with PHP in OS X
Next
From: Aspire Something
Date:
Subject: WARNING IN serverlog file