Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 8C348475967 for ; Mon, 27 May 2002 04:55:55 -0400 (EDT) Received: from web20408.mail.yahoo.com (web20408.mail.yahoo.com [216.136.226.127]) by postgresql.org (Postfix) with SMTP id 9F9C4475864 for ; Mon, 27 May 2002 04:55:51 -0400 (EDT) Message-ID: <20020527085552.72299.qmail@web20408.mail.yahoo.com> Received: from [203.172.2.6] by web20408.mail.yahoo.com via HTTP; Mon, 27 May 2002 01:55:52 PDT Date: Mon, 27 May 2002 01:55:52 -0700 (PDT) From: Ludwig Lim Subject: Re: Help in connecting to a database with PHP To: mmcgillick@attbi.com, pgsql-php@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200205/89 X-Sequence-Number: 1221 Hi: --- "Michael J. McGillick" 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=