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: Wed, 11 Aug 2021 13:18:46 -0700
Message-ID: <539a1cdd-69bf-48ec-dd57-93d1592d6c3c@aklaver.com> (raw)
In-Reply-To: <N0wXzQROwC6fXhI1USj0_Fo4SOn_gpsCRSl4a2J3Wz6ZDbA6MIIY5kAAQZFoafItjLG-MAdKDnZBtyCYvdW7qn0rfkmyAuX_16MqiZKBO1g=@protonmail.com>
References: <rzszV54MMnHHEeW_3AqpkJKS_lMTEZUq_D6WR9JyfSMlgX76QeWjgy_H8YzslU2hvQef-XR2YBSNCMZS4CaJABdZp3uRR7FTU9MBqgLdEhw=@protonmail.com>
	<ZV4khnVKWjnQRwgbKLOy30bqwjY1ZQs2j08fEc7wjHafd1rXOUTnuzGvBfcy4fAm0P7H6zOxCSgZAG0nyyEPvDRoLj93mm_hg_oHUtw7tr8=@protonmail.com>
	<a2724c54-be07-99cf-1ebc-2c978e0a5da7@aklaver.com>
	<tkUCMUw712K5m1iI6JdN31r7VnT4ZZYWXsFtsa5NsB5qN7SydCd8eFAtlXyyd5PRGkhxO8Kkso1lE1wEjFYPSfj-ewJcD0d0mPKyRRA8gkE=@protonmail.com>
	<79e859dc-9e70-cb72-85f8-e31786ad224d@aklaver.com>
	<VxhOLZOtHnK-tyKh98xh_FSWtJbq-1KrdeUK57clRIiKP6I0RcarycSViVspB2Ipynio1AepIuAAfxCM_hHkQNTEMjq4hmy3W6ce7JS2s3o=@protonmail.com>
	<5ae56ed6-ca48-b809-1e2d-85c36ca42f3e@aklaver.com>
	<a5swJw18YHxKBbeDQzsYUFp5P3ni5PMgQQHm_zIDg7-9w3aEnIKNOTktT095fK-vennNx0Bpa_XVJO3Kzww01f20iAzSj4HsXh4uByEUfMI=@protonmail.com>
	<15fdcfa5-dd32-a4bf-ee1f-3396393cc41f@aklaver.com>
	<N0wXzQROwC6fXhI1USj0_Fo4SOn_gpsCRSl4a2J3Wz6ZDbA6MIIY5kAAQZFoafItjLG-MAdKDnZBtyCYvdW7qn0rfkmyAuX_16MqiZKBO1g=@protonmail.com>

On 8/11/21 10:02 AM, ourdiaspora wrote:
> 
> On Wednesday, August 11th, 2021 at 3:09 PM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
> 
>>
>> Is the Web server/PHP app on the same machine as the Postgres server?
>>
> 
> All programs about this question are installed on a single computer; the intention is to test and learn first on a local machine.
> 
>> If it is on the same machine what happens if you do?:
>>
>> $dbconn = pg_connect("dbname=cpacweb user=cpaca") or die("Could not
>>
>> connect");
>>
> 
> Am happy to report that connection looks successful, because the php web page now reports:
> 
> "
> 	Connection status ok
> "

That is just working around the problem, which is something is blocking 
the TCP port 5432 on localhost. Generally speaking, that should not be 
happening. You need to figure out what is doing this or you will 
probably be facing more issues down the road. From what you have shown 
it seems to be related to the Web application itself. I would try with 
pg_connect("dbname=cpacweb user=cpaca host=localhost") and look at the 
Web server logs.

> 
> Thank you all very much for the help. Hope that other novices benefit too! :)
> 
> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (36+ messages)  latest in thread

Message-ID: <539a1cdd-69bf-48ec-dd57-93d1592d6c3c@aklaver.com>
Permalink:  ../539a1cdd-69bf-48ec-dd57-93d1592d6c3c@aklaver.com/
Also on:    postgresql.org/message-id/539a1cdd-69bf-48ec-dd57-93d1592d6c3c@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: <539a1cdd-69bf-48ec-dd57-93d1592d6c3c@aklaver.com>
  References: <rzszV54MMnHHEeW_3AqpkJKS_lMTEZUq_D6WR9JyfSMlgX76QeWjgy_H8YzslU2hvQef-XR2YBSNCMZS4CaJABdZp3uRR7FTU9MBqgLdEhw=@protonmail.com> <a2724c54-be07-99cf-1ebc-2c978e0a5da7@aklaver.com> <tkUCMUw712K5m1iI6JdN31r7VnT4ZZYWXsFtsa5NsB5qN7SydCd8eFAtlXyyd5PRGkhxO8Kkso1lE1wEjFYPSfj-ewJcD0d0mPKyRRA8gkE=@protonmail.com> <79e859dc-9e70-cb72-85f8-e31786ad224d@aklaver.com> <VxhOLZOtHnK-tyKh98xh_FSWtJbq-1KrdeUK57clRIiKP6I0RcarycSViVspB2Ipynio1AepIuAAfxCM_hHkQNTEMjq4hmy3W6ce7JS2s3o=@protonmail.com> <5ae56ed6-ca48-b809-1e2d-85c36ca42f3e@aklaver.com> <a5swJw18YHxKBbeDQzsYUFp5P3ni5PMgQQHm_zIDg7-9w3aEnIKNOTktT095fK-vennNx0Bpa_XVJO3Kzww01f20iAzSj4HsXh4uByEUfMI=@protonmail.com> <15fdcfa5-dd32-a4bf-ee1f-3396393cc41f@aklaver.com> <N0wXzQROwC6fXhI1USj0_Fo4SOn_gpsCRSl4a2J3Wz6ZDbA6MIIY5kAAQZFoafItjLG-MAdKDnZBtyCYvdW7qn0rfkmyAuX_16MqiZKBO1g=@protonmail.com> <539a1cdd-69bf-48ec-dd57-93d1592d6c3c@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