Answer the question
In order to leave comments, you need to log in
Postgres connect not going through http?
There is a connection script to Postgresql.
Test.php
If I call in the console through php test.php, then everything works.
If the same code is put in the http method and called through a browser or curl , then there is no connection.
Ports are open, I do not understand what's wrong.
in /var/lib/pgsql/data/pg_hba.conf registered
local all user1 md5
# IPv4 local connections:
host all all 127.0.0.1/24 md5
cat /var/lib/pgsql/data/postgresql.conf
listen_addresses = '*' # what IP address(es) to listen on;
Answer the question
In order to leave comments, you need to log in
1. server restart after config change
2. no pgsql driver in php?
3. role/login?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question