No pg_hba.conf entry ???

From: "Paulo Parola" <pgsql(at)brazilinfo(dot)com>
To: "pgsql-general" <pgsql-general(at)postgreSQL(dot)org>
Subject: No pg_hba.conf entry ???
Date: 2000-02-21 17:01:58
Message-ID: 001601bf7c8d$a3d76ae0$0100c0a8@venus
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

My ISP is having many problems with PostgreSQL (version 6.3) running upon
BSD/OS 3.1 i386 (PHP version 3.0.12) so that they made available to me a new
server running FreeBSD 3.3-RELEASE i386 (PHP version 3.0.12) and a new
version of PostgreSQL (6.5.2). I have recreated the database and its tables
at the new server and have reinstalled the PHP3 pages which access this
database but I keep receiving the following message while trying to access
the PHP3 pages:

Warning: Unable to connect to PostgresSQL server: No pg_hba.conf entry for
host xxx.xxx.xxx.xxx, user my_user, database photos in
/usr/local/etc/httpd/htdocs/image_database/image_database_search_results_br.
htm on line 12
Bad connection to database!
Sorry
.

The command to connect inside the script is the following:

if ( !($pgconn = pg_connect("localhost", "5432", "", "", "photos")) )
{
echo "Bad connection to database!<p>Sorry<p>.\n";
}
else
{
.....
}

My 'pg_hba.conf' is located inside directory 'data' below subdirectory 'pgsql' where PostgreSQL files are located, and contains at the moment only the following lines (the same as in the old server):

local all trust
host all 127.0.0.1 255.255.255.255 trust

Why connection works for the old server and not for the new one???

TIA,
Paulo

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pete Bass 2000-02-21 17:04:06 Error using update
Previous Message Jim Mercer 2000-02-21 17:00:24 Re: [GENERAL] No pg_hba.conf entry ???