phpmacospostgresqlpdophp-pgsql

Postgres.app pdo_pgsql pgsql installed but php couldn't find module. MAC OS X


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

Solution

  • After install new OS X El Capitan I have to: Please note that I've installed http://postgresapp.com/ I highly recommend this.

    Or I've modified one script I've found. You can download and use it from https://gist.github.com/FilipLukac/b460b233857a65e1342a

    And then restart apache sudo apachectl -k restart