Skip site navigation (1) Skip section navigation (2)

Re: psql + php on Mac OS X

From: Martin Hampl <Martin(dot)Hampl(at)gmx(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: psql + php on Mac OS X
Date: 2004-03-08 23:20:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
It works, hooray! Thank you *very* much!


Am 08.03.2004 um 23:59 schrieb Tom Lane:

> Martin Hampl <Martin(dot)Hampl(at)gmx(dot)de> writes:
>> Both, PostgreSQL and PHP run just fine. However, if I try to access a
>> database I just get the message "Warning: pg_connect(): Unable to
>> connect to PostgreSQL server: could not connect to server: Connection
>> refused  Is the server running on host "localhost" and accepting
>> TCP/IP connections on port 5432?"
>> PostgreSQL is running and I think it is using port 5432 (however, I am
>> not completely sure how to check this---"show port;"?)
> My bet is that you have Postgres set to accept only Unix-socket
> connections.  PHP is evidently trying to connect via a TCP socket.
> I think it's possible to alter the PHP connection info to use a
> Unix socket, but you might prefer to turn on tcpip_socket in Postgres.
> 			regards, tom lane

In response to

pgsql-novice by date

Next:From: Lola LeeDate: 2004-03-09 00:31:44
Subject: Re: psql + php on Mac OS X
Previous:From: Tom LaneDate: 2004-03-08 22:59:25
Subject: Re: psql + php on Mac OS X

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group