Re: [GENERAL] Unable to connect to Postgresql

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: [GENERAL] Unable to connect to Postgresql
Дата
Msg-id 081a7f86-0488-4bb6-9754-4bb37a005fd2@manitou-mail.org
обсуждение исходный текст
Ответ на Re: [GENERAL] Unable to connect to Postgresql  (John Iliffe <john.iliffe@iliffe.ca>)
Список pgsql-general
    John Iliffe wrote:

> >  <?php echo file_exists("/tmp/.s.PGSQL.5432"); ?>
> >
> Basically, nothing.
>
> If I include it in an Apache script exactly as suggested, then the script
> puts out a blank screen, no error messages.

So from the point of view of the Apache process, that file does
not exist. That's consistent with the error you reported when
trying to connect through the Unix domain socket:

  Unable to connect to PostgreSQL server: could not connect to server:
  No such file or directory
  Is the server running locally and  accepting connections on
  Unix domain socket  "/tmp/.s.PGSQL.5432"?

If apache is chrooted, or secured by other means with the similar result
that it cannot access the full filesystem, that's expected.
In this case, connecting to localhost with TCP/IP rather than a Unix domain
socket looks like the simpler solution.


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite


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

Предыдущее
От: "Steve Petrie, P.Eng."
Дата:
Сообщение: Re: [GENERAL] TimeScaleDB -- Open Source Time Series Database Released (www.i-programmer.info);
Следующее
От: "Daniel Verite"
Дата:
Сообщение: Re: [GENERAL] Unable to connect to Postgresql