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 780C5D1B962 for ; Tue, 19 Aug 2003 05:06:19 -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 00970-01 for ; Tue, 19 Aug 2003 05:06:08 -0300 (ADT) Received: from lighthouse.MplusB.de (lighthouse.MplusB.de [193.102.49.10]) by svr1.postgresql.org (Postfix) with ESMTP id 504E1D1B8BD for ; Tue, 19 Aug 2003 05:06:05 -0300 (ADT) Received: from [193.102.49.130] (helo=compass.MplusB.de) by lighthouse.MplusB.de with esmtp (Exim 3.35 #1 (Debian)) id 19p1V6-00046D-00; Tue, 19 Aug 2003 10:05:56 +0200 Received: from MplusB.de (gerd@sloop.MplusB.de [193.102.49.177]) by compass.MplusB.de (8.9.3p2/8.9.3/Debian 8.9.3-21) with ESMTP id KAA31861; Tue, 19 Aug 2003 10:05:56 +0200 X-Authentication-Warning: compass.MplusB.de: Host gerd@sloop.MplusB.de [193.102.49.177] claimed to be MplusB.de Message-ID: <3F41DA63.1070909@MplusB.de> Date: Tue, 19 Aug 2003 10:05:55 +0200 From: Gerd Terlutter User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.2) Gecko/20030401 Debian/1.0.2-2 X-Accept-Language: de-de MIME-Version: 1.0 To: dash@www.rogue-penguin.com Cc: pgsql-php@postgresql.org Subject: Re: Authentication Failure with pg_pconnect References: <34595.24.169.200.199.1061227831.squirrel@rogue-penguin.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/74 X-Sequence-Number: 2251 dash@www.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 > > Could not connect to the database > ---- > > The line 79 it refers to is the line with the pg_pconnect call in the > following function: > > ---- > var $db_connect_id; > var $query_result; > var $in_transaction = 0; > var $row = array(); > var $rowset = array(); > var $rownum = array(); > var $num_queries = 0; > > // > // Constructor > // > function sql_db($sqlserver, $sqluser, $sqlpassword, $database, > $persistency = true) > { > $this->connect_string = ""; > > if( $sqluser ) > { > $this->connect_string .= "user=$sqluser "; > } > > if( $sqlpassword ) > { > $this->connect_string .= "password=$sqlpassword "; > } > > if( $sqlserver ) > { > if( ereg(":", $sqlserver) ) > { > list($sqlserver, $sqlport) = split(":", $sqlserver); > $this->connect_string .= "host=$sqlserver port=$sqlport "; > } > else > { > if( $sqlserver != "localhost" ) > { > $this->connect_string .= "host=$sqlserver "; > } > } > } > > if( $database ) > { > $this->dbname = $database; > $this->connect_string .= "dbname=$database"; > } > > $this->persistency = $persistency; > > $this->db_connect_id = ( $this->persistency ) ? > pg_pconnect($this->connect_string) : pg_connect($this->connect_string); > > return ( $this->db_connect_id ) ? $this->db_connect_id : false; > } > --------- > > > PLEASE give me a hand here, at least point me towards people who might > know more. I need to figure this out. > > A. Leigh > dash@rogue-penguin.com > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > have you tried echo $this->connect_string ? -- -------------------------------------------------------- # Gerd Terlutter | Mueller+Blanck Software GmbH # # gerd@MplusB.de | Gutenbergring 38 # # gerd.terlutter@web.de | D-22848 Noderstedt # # tel:0171/6992579 | tel:+49 40 500 171-1 # # Buero:040/500171-17 | fax:+49 40 500 171-71 # --------------------------------------------------------