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.