Difficulty:INTERMEDIATE
Applies to:WHM/cPanel

Summary

This guide will explain how to enable the PDO modules for Apache and PHP within your WHM/cPanel, these modules allow for connectivity with MySQL and SQLite3. 

Step-by-Step Guide

Step 1:

Login to WHM/cPanel and go to "Software"

Step 2:

Click "Easy Apache 3"


INFORMATIONIf you have Easy Apache 4 installed that will need to be used. WHM/cPanel will let you know if this is the case.

Step 3:

Under "Previously Saved Config" click the cog icon to configure the configuration. 


Step 4:

For the Apache version you should leave this as default Click "Next Step"  


Step 5:

For the PHP version we can leave this as default Click "Next Step"



Step 6:

For the "Short Options List" scroll to the bottom and select "Exhaustive Options List"




Step 7:

From the list find the options for "PDO" and select the ones your require, you can also take the opportunity to enable any other features you require at this stage. Be careful not to enable and modules you do not require, as a general rule any modules not being used should be disabled to make security of your services more efficient by removing possible attack vectors. 



When you select the options a warning will appear, read this and click "Ok" if you agree.


Step 8:

Once the options are selected scroll to the bottom of the page and click "Save and Build"


You will get a message about the recompiling Apache, click "Ok" if you agree.


A final message will appear, read the message and click "I Understand" to start the recompile of Apache. 


WARNINGDuring the recompile Apache will be unavailable, this will mean your websites will be offline until the recompile is complete. This usually takes around 5 minutes to complete but it directly linked to the amount of CPU and Memory available to the process.

Step 9:

Easy Apache will now start to automatically compile, and you will see messages for the the process.


Leave this browser window open until the process has successfully completed.


A final message may appear to "Configure PHP and suEXEC", scroll to the bottom and click "Close"


Completed

PHP and Apache have now been successfully recompiled to include the required modules, these are now available to use immediately.