I have problem with Postgres.app. Postgres.app is running without problems.
In my phpinfo()
I can see.
PDO drivers => mysql, odbc, sqlite, pgsql
If I run commat php -m
I can see:
...
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
Everything seems to be installed and prepared. But If I run my project, It says.
could not find driver
I've installed pgsql and pdo_pgsql by following link https://alistairphillips.com/apple/osx/php-pdo-pgsql/
PS: I also have
extension=pdo_pgsql.so
extension=pgsql.so
After install new OS X El Capitan I have to: Please note that I've installed http://postgresapp.com/ I highly recommend this.
cd php-{version}/ext/pdo_pgsql
phpize
./configure --with-pdo-pgsql="/Applications/Postgres.app/Contents/Versions/9.4"
sudo make && make install
cd php-{version}/ext/pgsql
phpize
./configure --with-pgsql="/Applications/Postgres.app/Contents/Versions/9.4"
sudo make && make install
Or I've modified one script I've found. You can download and use it from https://gist.github.com/FilipLukac/b460b233857a65e1342a
PHP_VERSION
variable PHP_INI
variable (php.ini
file location path)./install.sh
And then restart apache sudo apachectl -k restart