Answer the question
In order to leave comments, you need to log in
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
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question