Re: php connection failure - Mailing list pgsql-general

From Adrian Klaver
Subject Re: php connection failure
Date
Msg-id a39e484b-3816-614d-4141-343b5b08b2a9@aklaver.com
Whole thread Raw
In response to Re: php connection failure  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: php connection failure
List pgsql-general
On 8/11/21 7:09 AM, Adrian Klaver wrote:
> On 8/11/21 4:09 AM, ourdiaspora wrote:
> 
>> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
>> For sign-in today via commands below, the log file shows nothing new, 
>> only the old errors:
>> "
>> psql -d cpacweb -U cpacapsql (9.6.16)
>> Type "help" for help.
>>
>> cpacweb=> \q
>> psql -d cpacweb -h localhost -U cpaca Password for user cpaca:
>> psql (9.6.16)
>> SSL connection (protocol: TLSv1.2, cipher: 
>> ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
>> Type "help" for help.
>>
>> cpacweb=> \q
>> "
>>
>> The connection to postgresql seems OK now (thank you), but the php web 
>> page continues to fail to connect to the database:
> 
> Is the Web server/PHP app on the same machine as the Postgres server?

Should have added previously:

Are you using some form of container/VM on the machine for either server?

> 
> If it is on the same machine what happens if you do?:
> 
> $dbconn = pg_connect("dbname=cpacweb user=cpaca") or die("Could not 
> connect");
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: php connection failure
Next
From: Alvaro Herrera
Date:
Subject: Re: Getting pg_stat_database data takes significant time