On Sunday 09 April 2017 18:27:49 rob stone wrote:
Hi Rob:
Thanks for chiming in.
> Hello John,
>
> Just saw this message.
>
> > Still set to the default:
> >
> > #listen_addresses = 'localhost' # what IP address(es) to
> > listen on;
> > # comma-separated list of
> > addresses;
> > # defaults to 'localhost';
> > use '*'
> > for all
> > # (change requires restart)
> > #port = 5432 # (change requires restart)
> >
> > I did change the Unix domain socket directories:
> >
> > #unix_socket_directories = '/tmp' # comma-separated list of
> > directories
> > unix_socket_directories = '/tmp,/var/pgsql' # *****changed from
> > default
> > #
>
> Your set-up has Apache, PHP and Postgres all running from the same
> machine.
> So as far as running from there goes, it is "localhost".
> There is no requirement to traverse a network. It is all on the same
> physical machine.
>
> Alter your postgresql.conf file and remove the hash so that:-
>
> listen_addresses = 'localhost'
>
> is explicitly defined. Alter pg_hba.conf so that localhost is declared
> and let's see what happens.
Same as before; the TCP connection works as expected but the Unix domain
socket reports
-------------------
Sun Apr 09 20:07:02.915744 2017] [php7:warn] [pid 27755:tid
140325136111360] [client 192.168.1.10:36749] PHP Warning: pg_connect():
Unable to connect to PostgreSQL server: could not connect to server: No
such file or directory\n\tIs the server running locally and
accepting\n\tconnections on Unix domain socket
"/tmp/.s.PGSQL.5432"? in /httpd/iliffe/testfcgi.php on line 133
-------------------
>
> Cheers,
> Rob