From: | John Iliffe <john(dot)iliffe(at)iliffe(dot)ca> |
---|---|
To: | rob stone <floriparob(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Joe Conway <mail(at)joeconway(dot)com> |
Subject: | Re: Unable to connect to Postgresql |
Date: | 2017-04-10 00:19:14 |
Message-ID: | 201704092019.14805.john.iliffe@iliffe.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | John Iliffe | 2017-04-10 00:30:53 | Re: Unable to connect to Postgresql |
Previous Message | John Iliffe | 2017-04-10 00:09:08 | Re: Unable to connect to Postgresql |