Re: Authentication Failure with pg_pconnect

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: <dash(at)melchior(dot)rogue-penguin(dot)com>
Cc: <pgsql-php(at)postgresql(dot)org>
Subject: Re: Authentication Failure with pg_pconnect
Date: 2003-08-19 15:50:33
Message-ID: Pine.LNX.4.33.0308190944370.9190-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

On Mon, 18 Aug 2003 dash(at)melchior(dot)rogue-penguin(dot)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.

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message scott.marlowe 2003-08-19 16:00:47 Re: Securing PHP scripts
Previous Message Bruno Wolff III 2003-08-19 15:39:09 Re: Securing PHP scripts