Drupal Technical
Drupal] How to solve fatal error with Class 'PDO' in Drupal sites?
We have been facing the error message "Fatal error: Class 'PDO' not found in includes/database/database.inc on line 184" in one of our Drupal sites. Googling up the error text had brought out a number of solutions which did not help to resolve the error in our case as there is no single cause of the error. However we managed to solve it using a different method. If you are facing the same scenario in your Drupal site and want to know how to solve fatal error with Class 'PDO' in Drupal sites the continue reading for the solution.
This is how we fixed the error
- We traced the source of the error message to the custom php.ini file in the root folder of our Drupal site
- Removing the custom php.ini file from the root folder solved the issue.
- Just take care of the following things when you attempt this fix in your site
- If your site is in public_html you can remove or rename the php.ini file.
- If your site is in a subfolder like public_html/beta do the same process or copy php.ini from beta that to root folder.
This fix solved the issue for us. Hope it helps you too