D
D
Dauren S2022-01-12 21:31:46
PostgreSQL
Dauren S, 2022-01-12 21:31:46

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

61df32d4e3308847067169.png
61df32e024f8f634208280.png

cat /var/lib/pgsql/data/postgresql.conf 

listen_addresses = '*'          # what IP address(es) to listen on;

61df3a0024393174206356.png

61df3b0d4411b277861593.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Turnaviotov, 2022-02-02
@foxmuldercp

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 question

Ask a Question

731 491 924 answers to any question