Installing pdo & pdo_mysql Using cPanel

By | November 16, 2012

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:
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:

I opened my PUTTY and followed instructions to no prevail.

As suggested by website, I used the command# –enable-pdo
No prevail..

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.