Filip Lukáč Filip Lukáč - 1 year ago 162
PHP Question pdo_pgsql pgsql installed but php couldn't find module. MAC OS X

I have problem with is running without problems.

In my

I can see.

PDO drivers => mysql, odbc, sqlite, pgsql

If I run commat
php -m
I can see:


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

PS: I also have

Answer Source

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

  • Install PHP5 from
  • Download PHP source packages (for my version) from
  • Unpack sources and do following:
    • cd php-{version}/ext/pdo_pgsql
    • phpize
    • ./configure --with-pdo-pgsql="/Applications/"
    • sudo make && make install
  • Install pgsql:
    • cd php-{version}/ext/pgsql
    • phpize
    • ./configure --with-pgsql="/Applications/"
    • sudo make && make install

Or I've modified one script I've found. You can download and use it from

  • Set up PHP_VERSION variable
  • Set up PHP_INI variable (php.ini file location path)
  • Run ./

And then restart apache sudo apachectl -k restart

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download