Re: Authentication Failure with pg_pconnect - Mailing list pgsql-php

From scott.marlowe
Subject Re: Authentication Failure with pg_pconnect
Date
Msg-id Pine.LNX.4.33.0308190944370.9190-100000@css120.ihs.com
Whole thread Raw
In response to Authentication Failure with pg_pconnect  (<dash@www.rogue-penguin.com>)
Responses Re: Authentication Failure with pg_pconnect  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-php
On Mon, 18 Aug 2003 dash@melchior.rogue-penguin.com wrote:

> I'm trying to get phpBB (php Bulletin Board System) running on my website
> but it's install program is having problems authenticating with
> postgreSQL.  I've tried to find out why it won't work and have pretty much
> narrowed things down to this one function in the install script.  If the
> following function doesn't seem flawed in any way, does anyone know why
> php my throw this error even though username and password is correct and
> user is logging in from localhost:
>
> ----
>  Warning: pg_connect() [function.pg-connect]: Unable to connect to
> PostgreSQL server: FATAL 1: IDENT authentication failed for user
> "postgres" . in /var/www/html/phpBB2/db/postgres7.php on line 79
> phpBB : Critical Error

Stop, do not pass go, do not collect $200.00

Note the error is that "IDENT authentication failed"

Look up ident authentication:

http://www.postgresql.org/docs/7.3/static/auth-methods.html#AUTH-IDENT

Note that the username of the client (in this case, likely either httpd or
nobody) is what postgresql inspects.  your connection string doesn't
matter since postgresql is now looking for a user account by the name of
whatever user your web server runs under.

http://www.postgresql.org/docs/7.3/static/auth-methods.html

tells us the ways to authenticate, and you're likely looking at using
trust, password, md5.

md5 is a good choice, or, if no one else will be writing apps on the
machine, trust is fast, but there's no actual authentication going on with
that method.



pgsql-php by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Securing PHP scripts
Next
From: Bruno Wolff III
Date:
Subject: Re: Authentication Failure with pg_pconnect