Re: Please help: PHP4/postgres db woes - Mailing list pgsql-php

From Danny O'Brien
Subject Re: Please help: PHP4/postgres db woes
Date
Msg-id BE6B4F0A-7125-11D8-85B0-0050E466B453@steinrogan.com
Whole thread Raw
In response to Re: Please help: PHP4/postgres db woes  ("scott.marlowe" <scott.marlowe@ihs.com>)
List pgsql-php
Hi Scott,

Thanks very much for your response. Please see my responses below.

On Mar 5, 2004, at 1:47 PM, scott.marlowe wrote:

> On Fri, 5 Mar 2004, Danny O'Brien wrote:
>
>> 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
>
> If you can upgrade the above to the latest, that would be a good thing.
> Especially postgresql.  At the very least, upgrade postgresql to 7.2.5
> or
> whatever the last version of 7.2 was.
>
>> 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.
>
> How are logins handled, via apache authentication, or custom PHP code?

I don't know. There's an auth.php file, which would lead me to conclude
the latter.

>
> do you mean apache / web site authentication, or pgsql authentication
> is
> failing?

My feeling is that either the site is not "seeing" the database, or,
more likely, the database itself is not properly set up.


>
>> I've taken the following actions:
> ...
>> 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
>
> You might want to try setting it to just trust on local and host
> 127.0.0.1/255.0.0.0 for testing to see if that lets you in.

I took this suggestion -- login still fails.


>
>> 4) Made sure that the php4-pgsql module is present  -- I did an
>> "apt-get" for this last week
>
> If you make a simple page that has this in it:
>
> <?php
> phpinfo();
> ?>
>
> what do you get (look in the apache httpd.conf file for the extensions
> php is setup to handle.  you may need to edit this and restart apache.

After following the above suggestion, the URL based on the above
returns a comprehensive PHP configuration info page.

>
>> 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?
>
> If auth.php is not finding the db, what kind of error is it giving.
> More details make it easier to troubleshoot your problem.

The site returns only the standard error contained in the auth.php:
"We're sorry but that is incorrect. Please try again."

Thanks again for your help.

--
Danny O'Brien


pgsql-php by date:

Previous
From: Danny O'Brien
Date:
Subject: Re: Please help: PHP4/postgres db woes
Next
From: Danny O'Brien
Date:
Subject: Re: Please help: PHP4/postgres db woes