FATAL: no pg_hba.conf entry for host

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

FATAL: no pg_hba.conf entry for host

Post by anjanesh »

All I have is one line of code :

Code: Select all

<?php
$test=pg_connect("host=localhost dbname=somedb user=someuser password=somepass");
?>
Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "xxx.xx.xxx.xxx", user "someuser", database "somedb", SSL off in /xx..xx/test.php on line 2
I searched for this and it seems that pg_hba.conf has to be edited (?) and Postgres has to be restarted.
Im doing this on my web host - everything works ok on my PC - so how do I get a wrokaround for this ?
Thanks
Last edited by anjanesh on Sun Aug 20, 2006 12:03 am, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

talk to your web host?
Post Reply