If your using cPanel to run your server, then it’s very simple to enable PDO & PDO_MYSQL within the WHM.
Access your WHM and navigate to your EasyApache.
Home >> Software >> EasyApache (Apache Update).
First, begin by selecting a profile to load.
Previously Saved Config (**DEFAULT**)
! This option loads the last saved configuration. If the configuration is missing, then default values will be provided.
Continue through the build process, until you reach the Exhaustive Options List section. When you reach the Exhaustive Options List, rebuild with PDO & PDO_MYSQL enabled. With PHP 5.3, PDO & PDO_MYSQL options are available, however by default they are disabled.
Prior to using cPanel, I attempted to install PDO & PDO_MYSQL via command and have spent a considerable amount of time installing with no prevail.. Using cPanel, it took me 2 minutes with EasyApache rebuilding in the background for about 12 minutes.
If your not using cPanel and have SSH access, then use command lines to install PDO & PDO_MYSQL.
Bellow, are a couple of suggested methods..
Use PUTTY look up PHP version in order to determine suggested install.
[~]# php -v
PHP 5.3.17 (cli) (built: Oct 15 2012 22:06:55)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
According to source: http://www.webhostingtalk.com/showthread.php?t=1119422
Run the following command:
[~]# yum install php-pdo
This command resolved the forum post above, however I was unable to install.
Then I came across a blog ‘ForLinux’, offering instructions on how to install PDO & PDO_MYSQL using PECL: http://www.forlinux.co.uk/expertise/blog/2012/07/30/installing-pdo-and-pdo_mysql-extensions-on-cpanel-server/
I opened my PUTTY and followed instructions to no prevail.
As suggested by website ehow.com, I used the command# –enable-pdo
Using cPanel saved me tremendous amount of time, as I would be on an expedition looking to resolve a simple task..
cPanel Documentation: The Apache Web Server with cPanel & WHM.