Re: [GENERAL] Unable to connect to Postgresql - Mailing list pgsql-general

From Daniel Verite
Subject Re: [GENERAL] Unable to connect to Postgresql
Date
Msg-id 081a7f86-0488-4bb6-9754-4bb37a005fd2@manitou-mail.org
Whole thread Raw
In response to Re: [GENERAL] Unable to connect to Postgresql  (John Iliffe <john.iliffe@iliffe.ca>)
List 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 by date:

Previous
From: "Steve Petrie, P.Eng."
Date:
Subject: Re: [GENERAL] TimeScaleDB -- Open Source Time Series Database Released (www.i-programmer.info);
Next
From: "Daniel Verite"
Date:
Subject: Re: [GENERAL] Unable to connect to Postgresql