how should I install pdo and pdo_mysql in MAC OS 10.8 ? #23

alduro opened this Issue Aug 24, 2012 · 3 comments

2 participants


I've been trying for several hours without luck. Drupal installation thrown this error:
PDOException: could not find driver in lock_may_be_available() (line 167 of /Users/..../Satio/Desarrollo/php/drupal-7.15/includes/

Should I have to configure php by hand this way?

'./configure' '--prefix=/Users/aldo/.phpbrew/php/php-5.4.6' '--with-config-file-path=/Users/aldo/.phpbrew/php/php-5.4.6/etc' '--with-config-file-scan-dir=/Users/aldo/.phpbrew/php/php-5.4.6/var/db' '--with-pear=/Users/aldo/.phpbrew/php/php-5.4.6/lib/php' '--disable-all' '--enable-bcmath' '--enable-cli' '--enable-ctype' '--enable-dom' '--enable-exif' '--enable-fileinfo' '--enable-filter' '--enable-hash' '--enable-fpm' '--with-xsl' '--with-tidy' '--with-xmlrpc' '--enable-json' '--enable-libxml' '--enable-mbregex' '--enable-mbstring' '--enable-phar' '--enable-session' '--enable-short-tags' '--enable-simplexml' '--enable-sockets' '--enable-tokenizer' '--enable-xml' '--enable-xmlreader' '--enable-xmlwriter' '--enable-zip' '--with-bz2' '--with-mhash' '--with-pcre-regex' '--with-zlib' '--with-libxml-dir' '--with-curl' '--with-openssl' '--with-libedit=/usr' '--with-readline' '--with-apxs2=/usr/sbin/apxs' '--with-pear' '--enable-pdo' '--with-sqlite3' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=shared'

After that, should I have to enable extension_dir and add within php.ini ? or under var/db/pdo.ini that has an entry ?


PHPBrew member


You can build php with variants +pdo +mysql to build a php with mysql support.

If the installation is done already, you can run:

 phpbrew install-ext pdo_mysql

to install pdo_mysql, to enable extension, simply run:

phpbrew enable pdo_mysql

I don't know why but it worked perfect after a new clean install. Thanks ! Quite easy to install extra modules running pecl install and customizing its ini file under ./php/php-5.4.6/var/db/ for instance.

@alduro alduro closed this Aug 27, 2012
PHPBrew member

yep, phpbrew enable command allows you to create ini file under var/db/. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment