Wed 19 Sep 2007
Hello,
PDO_MYSQL is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MySQL 3.x and 4.x databases.
PDO_MYSQL will take advantage of native prepared statement support present in MySQL 4.1 and higher. If you’re using an older version of the mysql client libraries, PDO will emulate them for you.
Steps to compile compile pdo_mysql module with php
1) Download the PDO package to server
# wget http://pecl.php.net/get/PDO
2) Manually build and install the PDO extension:
# tar xzf PDO-0.2.tgz
# cd PDO-0.2
# phpize
# ./configure
# make
# make install
# echo extension=pdo.so >> /usr/local/php5/lib/php.ini
3) rebuild PHP along with the drivers for PDO_mysql.
CUSTOM_PHP_FLAGS=”–with-pdo-mysql” /scripts/easyapache
4) check php module using php –m command
Enjoys
September 27th, 2007 at 12:20 am
Brilliant. Thanks for posting this Alex, it really helped.
I only needed the CUSTOM_PHP_FLAGS line to add the PDO_MySQL module as cPanel with PHP 5.2+ seems to include the PDO package by default but only with the sqlite module.
Cheers.