On 03/01/12 9:02 AM, Ruben Blanco wrote:
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 ... #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?
specify host=localhost, otherwise its using the first 'local' line, which specifies 'ident' authentication, as the error implies.
you do realize, trust lets any process on the localhost authenticate as any user, including the postgres DBA account?
-- john r pierce N 37, W 122 santa cruz ca mid-left coast -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general