The output of my phpinfo() (from a web script) and php -i are different. In particular the Oracle OCI8 module is completely absent from my phpinfo() which I believe is causing issues when trying to connect to remote oracle databases.
Both the output from phpinfo and the CLI point to the same php.ini files so I'm not sure what exactly is going on.
There are also several environment variables missing from phpinfo given the output from CLI
I am using a brew installed php and apache on El Capitan. I used these tutorials when configuring my environment:
https://echo.co/blog/os-x-1010-yosemite-local-development-environment-apache-php-and-mysql-homebrew
http://www.baldwhiteguy.co.nz/technical/index_files/mac-osx-oracle-instantclient.html