I'm trying to connect to Heroku Postgres which only support SSL connections. SSL connection works fine from other tools (Postico) and programming environments (Node.js), but when connecting from PHP I always get this error:
sslmode value "require" invalid when SSL support is not compiled
My local environment is OS X and all packages are installed with homebrew and have SSL support. Also pgsql has SSL support based on phpinfo() output:
SSL support => enabled
Libpq and Postgres are compiled with SSL support:
-lpgcommon -lpgport -lssl -lcrypto -lz -lreadline -lm
PHP version: 7.2.5 (also tried 5.6, 7.1 branches) Local Postgres and libpq version: 10.3
Tried every solution I could but can't get this connection working. Postgres support comes compiled out of box for PHP 7.2.5 when installing through homebrew. There is no more separate php-pgsql/php-pdo-pgsql package.