Re: psql + php on Mac OS X

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: psql + php on Mac OS X
Дата
Msg-id 17238.1078786765@sss.pgh.pa.us
обсуждение исходный текст
Ответ на psql + php on Mac OS X  (Martin Hampl <Martin.Hampl@gmx.de>)
Ответы Re: psql + php on Mac OS X  (Martin Hampl <Martin.Hampl@gmx.de>)
Re: psql + php on Mac OS X  (Lola Lee <lola@his.com>)
Список pgsql-novice
Martin Hampl <Martin.Hampl@gmx.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

В списке pgsql-novice по дате отправления:

Предыдущее
От: Martin Hampl
Дата:
Сообщение: psql + php on Mac OS X
Следующее
От: Martin Hampl
Дата:
Сообщение: Re: psql + php on Mac OS X