pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: ourdiaspora <ourdiaspora@protonmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: php connection failure
Date: Sat, 7 Aug 2021 14:05:27 -0700
Message-ID: <156bf596-48c7-624f-8168-0cca5f5b35bf@aklaver.com> (raw)
In-Reply-To: <YkLdfOX_3gv9n7MfrpTel4LhjQiTtv30opOMkZ3vwMcnfK14ZXCMYdxYBQdEIJxbb4YS8fhBi9FdLocsw81gCAZ08f0v3UvdVdhWU3r1-bg=@protonmail.com>
References: <rzszV54MMnHHEeW_3AqpkJKS_lMTEZUq_D6WR9JyfSMlgX76QeWjgy_H8YzslU2hvQef-XR2YBSNCMZS4CaJABdZp3uRR7FTU9MBqgLdEhw=@protonmail.com>
	<d9d1d112-16d8-c92b-981e-4c14aaa906e5@aklaver.com>
	<YkLdfOX_3gv9n7MfrpTel4LhjQiTtv30opOMkZ3vwMcnfK14ZXCMYdxYBQdEIJxbb4YS8fhBi9FdLocsw81gCAZ08f0v3UvdVdhWU3r1-bg=@protonmail.com>

On 8/7/21 1:09 PM, ourdiaspora wrote:
> 
> On Saturday, August 7th, 2021 at 8:23 PM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
> 
>>> Since further configuration, remain unable to connect to the php database.
>>
>> Further configuration of what?
>>
> 
> The postgresql configuration file:
> 
> SHOW hba_file;
> 	/etc/postgresql/9.6/main/pg_hba.conf
> SHOW config_file;
> 	/etc/postgresql/9.6/main/postgresql.conf
> 
>> After the configuration change did you restart the server?
>>
> 
> Yes; the php web page recognised changes, for example removal of the comment instruction:
> "
> <html>
> 	<head>
> 		Generic CPAC
> 	</head>
> 	<body>
> 		<?php
> 			//echo '<p>Hello World</p>'
> 			/*successful test of configuration of apache http server*/
> 			phpinfo();
> 		?>
> 	</body>
> </html>
> "

That is the Apache server restarting. I was asking about restarting the 
Postgres server. Was that done?

> 
>> Is the pg_hba.conf file the correct one for the database instance?
>>
> 
> Changes were made to the function 'listen_addressess' to the configuration file shown in above.

The connection was reaching the database so the 'listen_addresses' is 
correct. The issue is with the settings in pg_hba.conf and the 
connection being attempted. There have been similar problems with 
various OSes and their handling of localhost/120.0.0.2/::1.

So for the machine that is running the Postgres server:

1) OS and version?

2) The contents of /etc/hosts

3) What happens if you do?:

psql -d cpacweb -h 127.0.0.1 -U cpaca


> 
> 
>> What does:
>>
>> pg_lsclusters
>>
>> show?
>>
> 
> pg_lsclusters
> Ver Cluster Port Status Owner    Data directory               Log file
> 9.6 main    5432 online postgres /var/lib/postgresql/9.6/main /var/log/postgresql/postgresql-9.6-main.log
> 
> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (36+ messages)  latest in thread

Message-ID: <156bf596-48c7-624f-8168-0cca5f5b35bf@aklaver.com>
Permalink:  ../156bf596-48c7-624f-8168-0cca5f5b35bf@aklaver.com/
Also on:    postgresql.org/message-id/156bf596-48c7-624f-8168-0cca5f5b35bf@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, ourdiaspora@protonmail.com
  Subject: Re: php connection failure
  In-Reply-To: <156bf596-48c7-624f-8168-0cca5f5b35bf@aklaver.com>
  References: <rzszV54MMnHHEeW_3AqpkJKS_lMTEZUq_D6WR9JyfSMlgX76QeWjgy_H8YzslU2hvQef-XR2YBSNCMZS4CaJABdZp3uRR7FTU9MBqgLdEhw=@protonmail.com> <d9d1d112-16d8-c92b-981e-4c14aaa906e5@aklaver.com> <YkLdfOX_3gv9n7MfrpTel4LhjQiTtv30opOMkZ3vwMcnfK14ZXCMYdxYBQdEIJxbb4YS8fhBi9FdLocsw81gCAZ08f0v3UvdVdhWU3r1-bg=@protonmail.com> <156bf596-48c7-624f-8168-0cca5f5b35bf@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox