my currently extension folder in php is ( executing php-config --extension-dir)
-rwxrwxrwx 1 root wheel 32940 Feb 25 17:12 pdo_pgsql.so
-rwxrwxrwx 1 root wheel 135652 Feb 25 23:55 pgsql.so
Fatal error: Call to undefined function pg_connect()
The version i had wasn´t built with the
--with-postgresql option in brew so i uninstalled the php56 and then reinstalled it with the option mentioned before following all the instructions
You can get the post installation insctructions with
brew info php56 in my case.
With the php built with postgresql you don´t need to add the pgsql.so and pdo_pgsql.so extensions in the php.ini file.