First, install PEAR
sudo apt-get install php-pear
If you get anything about warning, ‘phpize’, this means you need php-dev. To install this simpy put this in the terminal (sudo apt-get install php-dev)
sudo pecl install pdo
Next, install pdo_mysql drivers.
sudo pecl install pdo_mysql
checking for MySQL support for PDO... yes, shared checking for mysql_config... not found configure: error: Cannot find MySQL header files under ERROR: `/tmp/tmpRiQ5ax/PDO_MYSQL-1.0.2/configure' failed
Then put this in the terminal:
sudo apt-get install libmysqlclient15-dev
and then sudo pecl install pdo_mysql
sudo updatedb
Open the php.ini file:
gksudo gedit /etc/php5/apache2/php.ini
extension=pdo.so extension=pdo_mysql.so
No comments:
Post a Comment