pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Costa <geeks@dotgeek.org>
To: Danny O'Brien <dannyo@steinrogan.com>
Cc: pgsql-php@postgresql.org
Subject: Re: Please help: PHP4/postgres db woes
Date: Tue, 9 Mar 2004 17:01:34 +0100
Message-ID: <0A26E2F5-71E3-11D8-ABD1-000A95EB456A@dotgeek.org> (raw)
In-Reply-To: <CC9F68D5-71E0-11D8-85B0-0050E466B453@steinrogan.com>
References: <00a001c40531$cb08e270$0301a8c0@Mesa.com>
	<CC9F68D5-71E0-11D8-85B0-0050E466B453@steinrogan.com>

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@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






view thread (12+ messages)  latest in thread

Message-ID: <0A26E2F5-71E3-11D8-ABD1-000A95EB456A@dotgeek.org>
Permalink:  ../0A26E2F5-71E3-11D8-ABD1-000A95EB456A@dotgeek.org/
Also on:    postgresql.org/message-id/0A26E2F5-71E3-11D8-ABD1-000A95EB456A@dotgeek.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: geeks@dotgeek.org, dannyo@steinrogan.com
  Subject: Re: Please help: PHP4/postgres db woes
  In-Reply-To: <0A26E2F5-71E3-11D8-ABD1-000A95EB456A@dotgeek.org>
  References: <00a001c40531$cb08e270$0301a8c0@Mesa.com> <CC9F68D5-71E0-11D8-85B0-0050E466B453@steinrogan.com> <0A26E2F5-71E3-11D8-ABD1-000A95EB456A@dotgeek.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox