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 14:09:55
Message-ID: 15fdcfa5-dd32-a4bf-ee1f-3396393cc41f@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

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(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2021-08-11 14:11:57 Re: php connection failure
Previous Message Vijaykumar Jain 2021-08-11 13:56:26 Re: Getting pg_stat_database data takes significant time