As an administrator or webmaster you should know a little how to fix common problems. One common problem is that an Apache or PHP module is missing. In this case a PHP module PDO is missing
What Is PDO?
PDO short for PHP Data Objects is a PHP module that gives programmers a consistent way to access databases via PHP. Many popular content management systems such as Drupal use PDO. If it is not enabled properly on your server you will get errors such as
Fatal error: Class 'PDO' not found in /includes/database/database.inc on line 184
How To Install PDO on WHM Server
1. If you have a WHM server, open the WHM control panel
2. Search for EasyApache in the sidebar on the left or use the search feature or hit CTRL + F
3. Alright, follow the instructions until step 4 (Short List) – then click on Exhaustive List at the bottom
4. You will now see a long list of additional modules for Apache, hit CTRL + F, enter PDO and hit Enter. Then select the options PDO and PDO-MySQL
5. Follow the instructions and click Save / Rebuild! Wait
Do Not Install PDO via PECL on CentOS Server
If you don’t have a WHM server, it is tempting to install PDO via PECL believing it is up to date – don’t! You will run into dependency errors or make errors. On a sidenote, always check if you are supposed to compile things via a control panel, so make sure this is the correct way before you break your server. In a best case scenario, you have a development server where you can test this sort of stuff first!
DO NOT USE:
pecl install pdo
yum update php-mysql
The latter command will enable PDO on your server