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

From rob stone
Subject Re: [GENERAL] Unable to connect to Postgresql
Date
Msg-id 1491773970.7940.2.camel@gmail.com
Whole thread Raw
In response to Re: [GENERAL] Unable to connect to Postgresql  (John Iliffe <john.iliffe@iliffe.ca>)
Responses Re: [GENERAL] Unable to connect to Postgresql  (John Iliffe <john.iliffe@iliffe.ca>)
List pgsql-general
Hello John,


> > 
> > > PHP and Postgresql are both running on same box.  It does have
> two
> > > interfaces, 192.168.1.6 and 192.168.1.7, and the test programme
> is
> > > available on either.  The reference to 192.168.1.10 is the client
> > > machine, in this case my workstation, which is 192.168.1.10.
> > 
> > Here is the error message you said came from the box running PHP:
> > >> > ------------------------------------------
> > >> > [Sun Apr 09 14:08:16.178126 2017] [php7:warn] [pid 24917:tid
> > >> > 139671464015616] [client 192.168.1.10:59260] PHP Warning:
> > >> > pg_connect(): Unable to connect to PostgreSQL server: could
> not
> > >> > connect to server: Connection refused\n\tIs the server running
> on
> > >> > host "192.168.1.6" and accepting\n\tTCP/IP
> connections on
> > >> > port 5432? in
> > >> > /httpd/iliffe/testfcgi.php on line 132
> > >> > -------------------------------------------
> > 
>

This is a tad confusing to me.

You have Apache, PHP, and Postgres all running on your LAN at
192.168.1.6.


You are on 192.168.1.10.

Your NOT doing "php -f testfcgi.php", so how does Apache "know" to run
that script?

Cheers,
Rob






pgsql-general by date:

Previous
From: John Iliffe
Date:
Subject: Re: [GENERAL] Unable to connect to Postgresql
Next
From: rob stone
Date:
Subject: Re: [GENERAL] Unable to connect to Postgresql