Q: Server 5.2 php not loading pgsql.so module
After installing macOS Sierra and Server 5.2, I find that Roundcube is no longer able to connect to its PostgreSQL database. I've traced it down to the php.ini configuration does not load the pdo_pgsql.so/pgsql.so modules. Has anyone else noticed this change?
I see that Server still has it's own php.ini file with pgsql extension settings in it. However, the php configuration no longer loads Server's php.ini file, as it seemed to previously. How might I make php load in Server's php.ini file?
Mac mini (Late 2012), macOS Sierra (10.12)
Posted on Sep 22, 2016 9:09 PM
It looks like the root cause is that Apple did not compile their PHP on Sierra with the '--with-config-file-scan-dir=/Library/Server/Web/Config/php/' configure command, as it was on El Capitan. This results in the /Library/Server/Web/Config/php/php.ini configure settings not being loaded.
The simple workaround for me was to append the contents of /Library/Server/Web/Config/php/php.ini to the end of /etc/php.ini. Then restart the web server and voila! Roundcube now connects to the database. You can also verify that pdo_pgsql.so/pgsql.so are indeed loading using the 'php -i' command.
If Apple corrects their mistake in a future update, then I'll have to try and remember to remove the appended part of php.ini. On the plus side, Apple DID recompile pdo_pgsql.so/pgsql.so for the new PHP version, so that's good.
BUT! There's always a but The new PHP 5.6 now defaults to checking TLS certificate chains, so even though Roundcube connects to the database, it doesn't authenticate to the mail server over TLS anymore and just throws an error when logging in. See here: http://www.roundcubeforum.net/index.php?topic=22035.0
I haven't got that part working yet, but that's a new topic.
Posted on Sep 23, 2016 8:08 PM