Re: [Phplib-users] postgresql authentication fail
Brought to you by:
nhruby,
richardarcher
From: Nathaniel P. <np...@te...> - 2003-11-10 17:34:46
|
On 11/9/2003 8:11 AM, GSO wrote : > > Hi, > > Have been trying to get past the following error for a few days now: > > Warning: Unable to connect to PostgresSQL server: FATAL 1: IDENT > authentication failed for user "www-data" in > /usr/lib/phplib/db_pgsql.inc on line 48 > Database error: Link-ID == false, connect failed > Session halted. > > PHP 3.0.18, PHPlib 7.2, psotgresql 7.2.1, apache 1.3.26. CGI scripts > run fine (accept from home directories where the default > Debian/Adamantix Apache configuration limits user directories to read > only). phpinfo() reports the postgresql interface fine. I am someone > who is more at home typing SQL in so would appreciate any help at all > on this one. Sounds like a database configuration problem to me. Make sure that there is a database user named www-data configured under PostgreSQL, and that you GRANT www-data permissions to the tables you want to access. Or you can supply a different username and password to connect to the database with in your local.inc file, however, be aware that this can cause security problems if you connect with the same user that created the database and/or tables or with the postgres superuser. If this isn't your problem, make sure that PostgreSQL is configured correctly to allow you to connect to the database in your pg_hba.conf file. If you are trying to connect to a remote database (it doesn't sound like you are, but...) you'll need to make sure that the PostgreSQL server of the remote machine is configured to allow you to authenticate remotely. Relavent documentation for PostgreSQL: http://www.postgresql.org/docs/view.php?version=7.2&idoc=1&file=user-manag.html http://www.postgresql.org/docs/view.php?version=7.2&idoc=1&file=client-authentication.html http://www.postgresql.org/docs/view.php?version=7.2&idoc=1&file=sql-grant.html -- ___________________________ Nathaniel Price http://www.tesserportal.net Webmaster |