drupal and PDO driver

Asked by:
HubFans / n/a Points
2014-02-24 6:48 am EST
I have tried many times installing Drupal with different php version .2 .3 and .4 without success. each time I get this error and when I checked the file in question (database.ini) I couldn't find any problem with it (line 184 is correct).
The error is:
Fatal error: Class 'PDO' not found in database.inc on line 187

is your PDO driver is correct for all php version? and how can I update this PDO driver?

To ask this user for more information, please first login.

To submit an answer, please login.



16,266 Points
2014-02-24 12:51 pm EST

Thank you for your question today. This error is usually due to the php.ini file not having the pdo settings enabled. You will want to have this set within the php.ini file in your hosting account file structure. Make sure you add the following lines to your php.ini file.


This should take care of the issue for you.

Kindest Regards,
Scott M

To submit a comment on this answer, please first login.

Hi Scott,
Thanks for the reply.
That's the first thing I have checked when I encountered this proble and all those lines were there.
Many posts out there suggest that the real problem is the hosting provider not binding the correct PDO driver for apecific php version.
The webhostinghub support staff don't seem to help on this and they blame it all on Drupal. However, I have many and many of my colleagues have thier Drupal sites install with other hosting provider without any problems and I me I am stack on the first hurdle..
any other suggestions...otherwise I'll have to change my hosting...
Thanks for your time
6 Points

2014-02-25 9:15 am EST
I'll be happy to take a look for you. Where are you seeing these errors?
2,342 Points
2014-02-25 10:20 am EST
Hi Jeff,

I see this error immediately after installing Drupal
Fatal error: Class 'PDO' not found in /home/abbiou5/public_html/www.womenandgirlsfootball.com/includes/database/database.inc on line 183.

I can't even go to my drupal admin page.
Can we have a chat session I am a Webhostinghub customer.
6 Points

2014-02-25 12:36 pm EST
Hello Abbi,

As per Scott, the main issue is that the reference for PDO is stored within the PHP.INI file. I looked at your website and you didn't have a PHP.INI file in that website, but the overall hosting account has a main PHP.INI in the public_html folder that is referenced. When typed in your domain name /phpinfo.php, you can see that the PDO drivers are loading. I went ahead and updated the PHP.INI file, so it should be working with the latest versions of the PDO drivers on the server. If you continue to have problems with the error, then you may want to copy the PHP.INI file into the root of the files for the website with the problem. Also copy phpinfo.php. You can then tell if it's loading properly. Scott further suggested the following (I already did the first line):

  • If that does not stop the error, ensure the extension_dir setting is commented out completely in the php.ini.

  • Set the following in your .htaccess file:

    SetEnv PHPRC /home/cPanelUser/public_html/php.ini

    Be sure to replaces your actual cpanel username where it says cPanelUser. This enables the pdo extensions and will hopefully remove the error.

Community Support will work with you generally through this interface and beyond if necessary. If you need immediate assistance using the chat interface, you would need to contact our live technical support team available 24/7.

Kindest Regards,
Arnel c.
16,417 Points
2014-02-25 5:09 pm EST
Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.