Re: Unable to connect to Postgresql

From: rob stone <floriparob(at)gmail(dot)com>
To: John Iliffe <john(dot)iliffe(at)iliffe(dot)ca>, pgsql-general(at)postgresql(dot)org
Cc: Joe Conway <mail(at)joeconway(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Subject: Re: Unable to connect to Postgresql
Date: 2017-04-09 21:39:30
Message-ID: 1491773970.7940.2.camel@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 &quot;192.168.1.6&quot; 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message rob stone 2017-04-09 22:27:49 Re: Unable to connect to Postgresql
Previous Message John Iliffe 2017-04-09 21:35:54 Re: Unable to connect to Postgresql