Re: php connection failure

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: php connection failure
Дата
Msg-id 539a1cdd-69bf-48ec-dd57-93d1592d6c3c@aklaver.com
обсуждение исходный текст
Ответ на Re: php connection failure  (ourdiaspora <ourdiaspora@protonmail.com>)
Список pgsql-general
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
localmachine.
 
> 
>> 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



В списке pgsql-general по дате отправления:

Предыдущее
От: Vijaykumar Jain
Дата:
Сообщение: Re: (13.1) pg_basebackups ./. pg_verifybackup
Следующее
От: Matthias Apitz
Дата:
Сообщение: Re: (13.1) pg_basebackups ./. pg_verifybackup