No pg_hba.conf entry ??? - Mailing list pgsql-general

From Paulo Parola
Subject No pg_hba.conf entry ???
Date
Msg-id 001601bf7c8d$a3d76ae0$0100c0a8@venus
Whole thread Raw
Responses Re: [GENERAL] No pg_hba.conf entry ???  (Jim Mercer <jim@reptiles.org>)
Re: [GENERAL] No pg_hba.conf entry ???  (Jim Mercer <jim@reptiles.org>)
List 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
containsat 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



pgsql-general by date:

Previous
From: Stephane Bortzmeyer
Date:
Subject: Re: [GENERAL] copying databases
Next
From: Pete Bass
Date:
Subject: Update Error