How to connect to Heroku postgres database from a local connection in php How to connect to Heroku postgres database from a local connection in php php php

How to connect to Heroku postgres database from a local connection in php


Heroku Postgres requires sslmode for external connections. You likely need to compile PHP with the --with-openssl[=dir] compile flag. See here for more information: http://www.php.net/manual/en/book.openssl.php

Can you verify your installation of PHP has openssl compiled in with it? The only way I know to check this is with a phpinfo() page and look for the --with-openssl flag.