X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 746AAD1B991 for ; Tue, 19 Aug 2003 12:53:49 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 84088-10 for ; Tue, 19 Aug 2003 12:53:39 -0300 (ADT) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by svr1.postgresql.org (Postfix) with ESMTP id 67C3ED1B96D for ; Tue, 19 Aug 2003 12:53:38 -0300 (ADT) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.9/8.12.9) with ESMTP id h7JFoSXd014136; Tue, 19 Aug 2003 09:50:28 -0600 (MDT) Date: Tue, 19 Aug 2003 09:50:33 -0600 (MDT) From: "scott.marlowe" To: Cc: Subject: Re: Authentication Failure with pg_pconnect In-Reply-To: <34595.24.169.200.199.1061227831.squirrel@rogue-penguin.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailScanner: Found to be clean X-MailScanner-SpamCheck: X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/80 X-Sequence-Number: 2257 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.