How to install PDO on cpanel-WHM servers with centOS

PDO is a component that is used by CMS scripts like joomla, drupal etc. Most of the web servers would not have it enabled by default.


For some reason, cPanel guys have decided to switch it off by default. Hence, if you are a server administrator and get a complaint from a client stating they are getting PDO related errors, then here are the steps that you can follow to get it installed. This tutorial assumes that you have a server with cPanel/WHM installed on it.

How to install PDO Login to WHM Find easyapache (apache update) from the left hand panel Click on Start customizing based on profile Select the Apache version you require. I would advise 2.2 Select the PHP verson. I would recommend PHP 5. Seclect the PHP Build, I would advise 5.2.17 Now scroll down to the bottom and select Exhaustive Options List Seclect PDO by checking the tick box next to it.

Proceed with the recompile Recompile may take anywhere between 10 to 45 minutes depending on the servers capabilities. After it has been done, you need to execute following commands to restart the services: /etc/init.d/cpanel restart /etc/init.d/httpd restart Now if you refresh the pages with error, it shouldn’t be there anymroe.

Feel free to comment below if you have any questions or confusion.

The following two tabs change content below.

Shane Richardson

Web Developer / Admin at HL Training Services
I have worked at various companies developing E-Commerce websites, and am keen to improve my developing skills. I also enjoy networking and maintenance. I graduated from University of the West of England and achieved a 2:2 in BSc Computing.

Latest posts by Shane Richardson (see all)