I am trying to access my Heroku Postgres database from php code that runs locally.
pg_connect("host=myhost port=5432 dbname=mydb user=me password=*** sslmode=require options='--client_encoding=UTF8'")
works well when the code runs on Heroku, but not locally. (value is the value given to Geroku)
I get this error:
Unable to connect to PostgreSQL server: sslmode "required" value is incorrect if SSL support is not compiled in
If I remove sslmode, I get this error:
The network is unavailable. Is the server running on the host "myhost" and accepting TCP / IP connections on port 5432?
Does anyone have a key? It will help a lot!
php postgresql heroku local
Guig
source share