Hi:
I cannot connect to my Postgres database from my PHP scripts. I get the error:
PHP Warning: pg_connect(): Unable to connect to PostgreSQL server:
FATAL: Ident authentication failed for user "postgres" in ...
I have tried many combinations for "host" TYPE in "pg_hba.conf"
(restarting postmaster) without success:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all ident
# IPv4 local connections:
#20120301 rbz [1291-1292]
#host all all 127.0.0.1/32 ident
# IPv6 local connections:
#20120301 rbz [1291-1292]
#host all all ::1/128 ident
#20120301 rbz [1291-1292]
#host all all 127.0.0.1/32 trust
#host all all 0.0.0.0/0 trust
#host all all * trust
host all all 127.0.0.1 255.255.255.255 trust
#host all all localhost trust
host all all ::1/128 trust
Isn't the las record the less restrictive configuration for "host" connections?
I can connect to psql witout any problem.
Thanks in advance for any help.