R
R
run1822022-01-20 17:53:29
PostgreSQL
run182, 2022-01-20 17:53:29

Why does an error occur when connecting to postgresql?

I connect to the database:
$connection = new PDO('pgsql: host = ***; port = ***; dbname = ***', '***', '***');

I get this result:
#0: PDO->__construct(string, string, string)

What does this error mean and how can I fix it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
run182, 2022-01-24
@run182

The problem was that on the remote database server where the connection led, access permissions were not correctly set. And the error was not visible, because there was a crooked encoding of the response (apparently that's why it was not displayed). I checked the error like this - I tested the connection from the console - there was also a crooked encoding, but there were also Latin characters by which we managed to recognize the error.

M
makol, 2022-01-20
@mak-oleg

Have you looked here?
Or here ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question