Re: php connection failure

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: ourdiaspora <ourdiaspora(at)protonmail(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: php connection failure
Date: 2021-08-11 20:18:46
Message-ID: 539a1cdd-69bf-48ec-dd57-93d1592d6c3c@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/11/21 10:02 AM, ourdiaspora wrote:
>
> On Wednesday, August 11th, 2021 at 3:09 PM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthias Apitz 2021-08-11 20:18:47 Re: (13.1) pg_basebackups ./. pg_verifybackup
Previous Message Vijaykumar Jain 2021-08-11 19:38:47 Re: (13.1) pg_basebackups ./. pg_verifybackup