I’m : a web and mobile developer based in the Manning Valley, Australia.

Enable PostgreSQL PDO support on OS X

Almost entirely sourced from but I'm keeping a copy for myself along with my tweaks.

OS X 10.10 comes with PHP 5.5.20 which you'll need to grab from

I'm running my copy of PostreSQL from so get a copy and install to your Applications folder.

cd ~/Downloads
tar -jxvf php-5.5.20.tar.bz2
sudo mkdir -p /usr/include
sudo mv php-5.5.20 /usr/include/php
cd /usr/include/php
./configure --without-iconv
cd ext/pdo_pgsql
brew install autoconf
./configure --with-pdo-pgsql=/Applications/
sudo cp /usr/lib/php/extensions/no-debug-non-zts-20121212

In checking php | grep ini I spotted that the base install was expecting additional configuration files within /Library/Server/Web/Config/php. That didn't exist so I created it along with in ini file containing

sudo mkdir /Library/Server/Web/Config/php

With that done php -m should now list pdo_pgsql as an included module