From: | Chadwick Rolfs <cmr(at)shell(dot)gis(dot)net> |
---|---|
To: | Jeff Self <jself(at)ci(dot)newport-news(dot)va(dot)us> |
Cc: | pgsql-php(at)postgresql(dot)org |
Subject: | Re: Not able to connect to server from PHP |
Date: | 2002-01-23 18:46:57 |
Message-ID: | Pine.SOL.3.96.1020123134218.18040B-100000@shell.gis.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
I had the same problem, and found identd to be sending encrypted usernames
for authentication. If you're fine with trust (those of us with paranoid
settings are never fine with trust), cool. If you don't want to use
trust, try passwd, or something else. I think the original problem is the
identd sending encrypted usernames...man identd.
Maybe php can encrypt your username the same way? That way you don't have
to trust anyone:)
On 22 Jan 2002, Jeff Self wrote:
> I'm working on a personnel database for my department. I can connect
> just fine using 'psql personnel'. I've created a PHP script to get a
> list of departments, but I'm getting the following error message:
>
> Warning: Unable to connect to PostgreSQL server: Peer authentication
> failed for user 'jeff' in /var/www/personnel/departments.php on line 10
> Unable to connect to database.
>
> Here's my script:
> <?php
> //
> // Display Departments
> //
> // departments.php, v 1.0
>
> include ($DOCUMENT_ROOT.'/personnel/include/functions.inc');
>
> $conn = pg_pconnect("dbname=personnel user=jeff");
> if (!$conn) {
> echo "Unable to connect to database.";
> exit;
> }
>
> Everything is running locally right now, Apache, PHP, PostgreSQL. I
> never modified my pg_hba.conf file. Everything looks identical as my
> system at home. I'm running PostgreSQL 7.1.3 and PHP 4.1.1.
> --
> Jeff Self
> City of Newport News
> 2400 Washington Ave.
> Newport News, VA 23607
> 757-926-6930
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
Chadwick Rolfs - cmr(at)gis(dot)net
Cleveland State University - Student
Music Major - The Holden Arboretum Volunteer
Computer Programmer - Student Employee
--*I finally found powdered water;
I just can't figure out what to add to it*--
From | Date | Subject | |
---|---|---|---|
Next Message | postgresql | 2002-01-23 20:39:24 | Re: Long running queries and timeouts |
Previous Message | Jean-Michel POURE | 2002-01-23 13:58:21 | Re: Long running queries and timeouts |