How to fix Fatal error: Class ‘PDO’ not found in PHP apps like Drupal, Prestashop, Joomla, etc

How to fix Fatal error: Class ‘PDO’ not found in PHP apps like Drupal, Prestashop, Joomla, etc

Other common causes of Fatal error: Class ‘PDO’ not found

As I mentioned earlier, this error is commonly caused by PHP settings mis-configuration. Here are a few scenarios we’ve seen:

The php.ini file missing

We’ve seen website owners overwriting fully function php.ini files with default configuration files that came with the Apache package. In such cases, the PHP configuration entry that ENABLES the PDO extension gets over-written.

To detect these issues, we look for the configuration entry “” in the active PHP configuration file. For instance, in the above example, we’d look for the “” in “/home/romrac/conf/php.ini“.

[ You don’t have to lose your sleep over PHP or MySQL errors in your websites. Get our professional help to fix your site for instantly. ]

PDO module not compiled or missing

In custom configured VPS servers, we’ve seen situations where PHP would not be compiled with a PDO extension, or the modules directory would be the PDO module file. To detect these issues, we look for the file “” in the extensions directory, or look at the compiled modules list using the phpinfo() function.

For instance, in the above example, the PHP extensions directory was “/usr/lib/php5/20121212“. So, we’d in that server, we’d look for “” in that directory.

[ Never let PHP errors affect your website functioning. Get our professional help to fix your website errors at affordable pricing. ]

Quick resolution of PHP errors

Modern servers use package management systems such as Yum or Apt to efficiently manage PHP configuration. However, customizing these settings for individual websites sometimes can lead to mis-configuration. Our help desk team traces these issues by following what we call “the flow of configuration“.

For example, when troubleshooting an issue in an Apache + mod-PHP server, our team would first check the Apache configuration file to make sure PHP is properly loaded.

Then the primary PHP configuration file (usually located in /etc) is checked to make sure all modules are loaded, the settings are correct, and if it allows user-level over-riding. Then the user’s PHP configuration file is checked to make sure settings are in sync with how the server is configured.

By following a well thought out troubleshooting process, our team is able to resolve such PHP issues within a few minutes, and thereby minimize website downtime.


PHP and MySQL errors giving your websites a hard time?

Don't let the intermittent website errors affect your business. We're here to help you.



  1. I had a difficulty with this too.
    On Windows, the addition needs to be
    (or extension=pdo_mssql.dll is using MSSQL)
    I was querying if adding this to the install file would be a good idea or not?

    • Hi Jessica,

      Thanks for your comment.

      I’m not sure which install file you’re referring to here.

      We do use custom installation scripts for mass deployments that takes care of all these settings, however I don’t think that is the one you have in mind.

      Which install file are you thinking of?


Submit a Comment

Your email address will not be published. Required fields are marked *

Bobcares is a server management company that helps businesses deliver uninterrupted and secure online services. Our engineers manage close to 51,500 servers that include virtualized servers, cloud infrastructure, physical server clusters, and more.