0
votes

i'm new here and I apologize if I'm doing something wrong for post my question.

My question is quite simple: From my machine I can connect pgAdmin III to a remote postgreSql (provide by Heroku). I can read/write my database without problems.

Unfortunately, from the same machine, I can't connect a PHP page using PDO extension (it work perfectly). The error it give to me is:

SQLSTATE[08006] [7] FATAL: no pg_hba.conf entry for host "x.x.x.x", user "username", database "myDatabase", SSL off

I should edit "pg_hba.conf" for resolve, but unfortunately I can't edit it on Heroku (or maybe I don't know how to do).

I don't understand why pgAdmin III can connect but my PHP page can't.

Thanks in advance.

1
Welcome to Stackoverflow! First of all, please read the tour. Next, you want to read How do I ask a good question? and edit your question accordingly. - Markus W Mahlberg

1 Answers

0
votes

You will get your ans in the following ans I think your user have no entry in pg_hba.conf file and your pgAdmin III and PHP users are different check the link