X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 31F6CD1B4D3 for ; Thu, 18 Mar 2004 16:09:31 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 12264-05 for ; Thu, 18 Mar 2004 12:09:24 -0400 (AST) Received: from mail2.steinrogan.com (mail2.steinrogan.com [208.184.41.243]) by svr1.postgresql.org (Postfix) with SMTP id DA4ABD1EBA5 for ; Thu, 18 Mar 2004 12:09:19 -0400 (AST) Received: (qmail 15767 invoked from network); 18 Mar 2004 16:13:08 -0000 Received: from unknown (HELO ?170.200.167.206?) (208.184.43.36) by mail2.steinrogan.com with SMTP; 18 Mar 2004 16:13:08 -0000 Mime-Version: 1.0 (Apple Message framework v612) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: pgsql-php@postgresql.org From: Danny O'Brien Subject: PHP/Postgres db install woes -- FIXED Date: Thu, 18 Mar 2004 11:09:45 -0500 X-Mailer: Apple Mail (2.612) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/46 X-Sequence-Number: 2645 Thanks to all who sent suggestions on this issue (original post below). As it turned out, the server setup, dbconnect, php.ini settings, etc. were all fine. The problem was unfixable by anyone who was not able to see and understand the PHP code of the site. The original programmers had constructed the site to decipher encrypted passwords. But then, they populated the database with unencrypted passwords. Once we realized this, all we had to do was to funnel our passwords through the encryption scheme and replace the plain text passwords in the database with the encrypted versions. Hopefully this experience will be useful to someone else, someday. - Danny O'Brien ******************************** > Any postgre experts out there? We have a PHP4 site that worked fine > under a previous RedHat build, but we just can't get it working on > this Debian build. > > Here's what we're running: > > Debian 3.0r1 "woody" > Kernel 2.4.18-bf2.4 > Apache 1.3.26-0woo > postgres 7.2.1-2wood > php 4.1.2-6wood > > We've applied a script sent to us by the original programmers, that > installed several logins and passwords. > But when we go to login to our PHP site, our login is rejected. > > I've taken the following actions: > > 1) Checked to see that the database (called "ourdb") is in fact > available by entering "psql ourdb." The database opens up to an > "ourdb" prompt. > > 2) Made sure that postgresql is running by outputting ps ax: > > xxx ? S 0:00 /usr/lib/postgresql/bin/postmaster > xxx ? S 0:00 postgres: stats buffer process > xxx ? S 0:00 postgres: stats collector process > > 3) Altered the pg_hba.conf (located in /etc/postgresql) to reflect the > following, and re-started postgre: > > #local all ident > sameuser > local all trust > host all 127.0.0.1 255.0.0.0 ident > sameuser > host all 0.0.0.0 0.0.0.0 reject > > 4) Made sure that the php4-pgsql module is present -- I did an > "apt-get" for this last week > > 5) Examined the postgres.log for clues -- the log file is empty, > indicating that no login attempts have been made -- I suppose because > the auth.php has not found the DB? > > 6) pg_exec call deprecated under PHP 4.2.0 and replaced with pg_query: > since we're using php 4.1.2-6wood, it seems that this does not apply > to our setup. Correct? > > All suggestions welcome. Solution guaranteed posted to the list. > > - Danny O'Brien