I am getting the error
Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "::1", user "user_bch", database "test_bchOrder", SSL off in /home/www2.mysite/connect.php on line 8
on a postgreSQL php connection page. I wonder if it is because the domain is www2 so that my host is not 'localhost'. Perhaps it is something else. This is the server. Grateful for any help!
Thanks
pg_hba.conf
, it might be helpful if you provided (a) the connection parameters you used, and (b) the contents ofpg_hba.conf
. Keep in mind that you're posting about access and authentication to a public website, though. The Pg version is also generally good to include. – Craig Ringer Nov 21 '12 at 0:45pg_hba.conf
file? I'm a bit out of my depth. postgre version is 8.4.13. And I used these parameters:$host = "localhost"; $port = "5432"; $database = "database"; $username = "user"; $password = "password"; $con = pg_connect("host=$host port=$port dbname=$database user=$username password=$password");
Thank you very much! – thomas Nov 21 '12 at 0:50$host = "
my IP number"
I now get the errorWarning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: database "my database" does not exist in url...
Even though I've just deleted it and recreated it. – thomas Nov 21 '12 at 1:00