Skip site navigation (1) Skip section navigation (2)

Re: Please help: PHP4/postgres db woes

From: "bruce" <bedouglas(at)earthlink(dot)net>
To: "'David Costa'" <geeks(at)dotgeek(dot)org>,"'Danny O'Brien'" <dannyo(at)steinrogan(dot)com>
Cc: <pgsql-php(at)postgresql(dot)org>
Subject: Re: Please help: PHP4/postgres db woes
Date: 2004-03-09 16:18:25
Message-ID: 01dc01c405f2$26eb5d00$0301a8c0@Mesa.com (view raw or flat)
Thread:
Lists: pgsql-php
good suggestion.. however, i would argue that danny should make sure he can
do a manual command, and that he can determine that he can actually manually
get the "php" sql command to work from the manual command line...

once he gets this, then the rest becomes fairly straight forward...

-bruce



-----Original Message-----
From: pgsql-php-owner(at)postgresql(dot)org
[mailto:pgsql-php-owner(at)postgresql(dot)org]On Behalf Of David Costa
Sent: Tuesday, March 09, 2004 8:02 AM
To: Danny O'Brien
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: [PHP] Please help: PHP4/postgres db woes


Hello Danny,
I can't go through your whole script but I recommend you use Pear::DB
as an abstraction layer for the pgsql connection and interaction.
This will give you more power with the debug and you can keep
everything simple IMHO.

More info at
http://pear.php.net/manual/en/package.database.php#package.database.db

It is default on PHP, so you don't even need to install anything.

Cheers
Regards,
David Costa, PHP-PostgreSQL Advocacy team     http://postgresql.org
david at postgresql ddoot org                 gurugeek att php dot net
$dsn = 'pgsql://world:most_advanced(at)localhost/open_source_database';



On Mar 9, 2004, at 4:45 PM, Danny O'Brien wrote:

>>>
>>> packages for Woody that we also use in some situations:
>>>
>>> deb http://people.debian.org/~elphick/debian/ stable main
>>>
>>> It seems most likely to me that your webserver is attempting to
>>> authenticate as www-data using 127.0.0.1 (rather than 'local' - i.e.
>>> no
>>> host spec in pg_connect) and that you are not allowing that in your
>>> pg_hba.conf, but the notes below do not give a lot of information to
>>> work from.
>>>
>>> Perhaps send the auth.php (with usernames / passwords munged), a
>>> "select
>>> * from pg_user" (ditto)
>>>
>>> Cheers,
>>> 					Andrew McMillan
>>
>>
>> Hi Andrew,
>>
>> Thanks for your response. Below is the contents of auth.php, per your
>> suggestion, if you feel like vetting the code. I'm not a PHP
>> programmer.
>> I'm responsible for getting the site
>> running. I've been able to do it before, under RedHat, but no




---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


In response to

pgsql-php by date

Next:From: Robby RussellDate: 2004-03-09 18:18:04
Subject: Re: Please help: PHP4/postgres db woes
Previous:From: Danny O'BrienDate: 2004-03-09 16:15:25
Subject: Re: Please help: PHP4/postgres db woes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group