Sunday, February 19, 2012

Installing PHP PDO extensions for Drupal 7 on ubuntu 10.04

I ran into some confusion installing php pdo extensions for php5.  Apparently installing has changed significantly with PHP versions over the last couple years.  The catch is PDO extension is installed by default with php5.  To enable it (ubuntu) add the extensions to your php.ini file.

extension=pdo.so

mysql_pdo now comes bundled with php5-mysql package in ubuntu.  So if you are installing on php5 please ignore all the many posts online that suggest installing it through pear, or pecl, if you try these ways you will be very dissapointed.

Once php5-mysql is installed all that is required is enabling it in your php.ini

extension=pdo_mysql.so

restart apache and you should be good to go!!

No comments:

Post a Comment