From: Ludwig Lim <lud_nowhere_man@yahoo.com>
To: mmcgillick@attbi.com
To: pgsql-php@postgresql.org
Subject: Re: Help in connecting to a database with PHP
Date: Mon, 27 May 2002 01:55:52 -0700 (PDT)
Message-ID: <20020527085552.72299.qmail@web20408.mail.yahoo.com> (raw)
In-Reply-To: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAATMX1T/YgGEKM6LUYbjsZU8KAAAAQAAAAE7U800jk30SH8CZ2ndzvnQEAAAAA@attbi.com>
Hi:
--- "Michael J. McGillick" <mmcgillick@attbi.com>
wrote:
> Hi:
>
>
>
> I'm trying to learn how to set up a .php file to
> connect to my
> PostgreSQL database. From the command line, I can
> connect, open and work
> in the database on my machine. However, if I create
> a .php page with the
> following information:
>
>
>
> $db = pg_connect("dbname=baseball
> user=postgres");
>
>
>
> I get the following error message:
>
>
>
> Warning: Unable to connect to PostgreSQL server:
> FATAL 1: IDENT
> authentication failed for user "postgres" in
> /var/www/html/baseball.php
> on line 10.
Try checking the file "pg_hba.conf" ( Usually in
/usr/local/pgsql/data). It seems that your connection
requires a password. try to set the "auth_type" to
"trust" in "pg_hba.conf" to skip password check or use
"pg_connect(dbname=baseball user=postgres
password=<password of the user account "postgres");"
Hope that helps.
ludwig.
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
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: lud_nowhere_man@yahoo.com, mmcgillick@attbi.com
Subject: Re: Help in connecting to a database with PHP
In-Reply-To: <20020527085552.72299.qmail@web20408.mail.yahoo.com>
References: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAATMX1T/YgGEKM6LUYbjsZU8KAAAAQAAAAE7U800jk30SH8CZ2ndzvnQEAAAAA@attbi.com> <20020527085552.72299.qmail@web20408.mail.yahoo.com>
* 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