Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCTVk-0003Fy-PG for pgsql-general@arkaria.postgresql.org; Sat, 07 Aug 2021 21:05:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mCTVi-0007on-N3 for pgsql-general@arkaria.postgresql.org; Sat, 07 Aug 2021 21:05:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCTVh-0007hK-Ms for pgsql-general@lists.postgresql.org; Sat, 07 Aug 2021 21:05:38 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCTVb-00027q-0S for pgsql-general@lists.postgresql.org; Sat, 07 Aug 2021 21:05:36 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id A34B43200805; Sat, 7 Aug 2021 17:05:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 07 Aug 2021 17:05:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=I dcJDHX6KDBjYG/nwU+06VxgikUDa0ofP8PtH3XwnEk=; b=JZkSolxQRX+9GzS7E NqmlUMmwTyTpiGKZbpWYexOBnd1nzOzgV25qxWfS2LFRQokjnQljaACgZdUxQPHl y616fqFe7VKvQ9cxh/ULfcRAO75G9WsDx4uGxkO8ZZmsXnJDdbO3rzMbvnTJ9f+b J3Yto72EuGcTx0zRLE7zNJuUf98OxdzPkqet+QCqfU7A03ziPQ1P6Q5p5GWWDfD4 Hv07o8B0jZ1j6vUufHncUQpOFya2VRS/nbVmg92+wVYS3XN0z88qL1YzEGN7wtKY Zsn1Q4VADDwJxGjZQh8N+sA934uLCNMvPnY2zn3EGn34LLd02ovvEtaOfOshVDYZ M21Tg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=IdcJDHX6KDBjYG/nwU+06VxgikUDa0ofP8PtH3Xwn Ek=; b=gnUZeFLNNzY0H9DtxruBXbsfuX0Ensnbs0w/6rCzQrhxGuuWc1Zu3fv4C Zy5bwmr5Yn0L8bk40NP3EodoM5A4vFcZ2Fv7LeI+M0WAVQrC0mNW0xO5PZC6YPhv zYBbC4aYNf80nJalX+zFmGVhgPnA76cW+O0AoV2+cCKQXsB5CCUfTfk0ZRwLwp+8 3MJ2pCGUDIvUehKLdii1DNBjvVDZbTgP1z4i6vBCgWwnjDU5rfx/+aRgqavIsJvX 5w/xcFCv4PbaN6VPmEPljNeszW+fHKmLUMZzYo50m4NCGv6Xkx6PNJWwKsoQodKT oAwMebuh/coSp98Bigf3h1nFrK/Ug== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeefgdduheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepteejvdetff ejuedvleeifeefheeutdfhgfdvhffhhfekvdduveegvdejudefgfevnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvh gvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Aug 2021 17:05:28 -0400 (EDT) Subject: Re: php connection failure To: ourdiaspora Cc: "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver Message-ID: <156bf596-48c7-624f-8168-0cca5f5b35bf@aklaver.com> Date: Sat, 7 Aug 2021 14:05:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/7/21 1:09 PM, ourdiaspora wrote: > > On Saturday, August 7th, 2021 at 8:23 PM, Adrian Klaver 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: > " > > > Generic CPAC > > > //echo '

Hello World

' > /*successful test of configuration of apache http server*/ > phpinfo(); > ?> > > > " 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