"could not find driver"

Permalink
Developing a new app in C5.7.5.9 on Blue Host, with Anitya theme. PHP version is 5.4.24.

Everything was going swimmingly. Until -- and I'm not sure if this is a co-incidence, or a cause. But, I attempted to upload a PDF file (I hadn't added the file to to allowable files prior to this.)

Now, any attempt to access the site just gives a white page with "An Unexpected Error Occurred" -- could not find driver.

Research in the forum indicates this may be related to Blue Host, or an upgrade of PHP from 5.4 to 5.6.

I'm touching base with Blue Host, debugging the event also, but wanted to see if anyone had any thoughts.

Thanks

View Replies: View Best Answer
jvansanten replied on at Permalink Best Answer Reply
Cool trick from another thread which gives a nice execution trace:

Make a backup of application/config/generated_overrides/concrete.php. Normally you should *not* edit this file, but needs must..

Open it in a text editor and look for something that looks like this:
'debug' => array(
        'detail' => 'message',
        'display_errors' => true,
    ),
and edit it carefully so it looks like this:
'debug' => array(
        'detail' => 'debug',
        'display_errors' => true,
    ),


The app errors on an attempt to instantiate a PDO driver. Why this happened all of a sudden, I have no idea.

I added a php.ini file, and may have left out the PDO driver, so that may be the cause.

Thanks for helping me think that through...
jvansanten replied on at Permalink Reply
Just a quick note to follow up.

I'd run into an issue of uploaded file size, and wanted to increase that value through the php.ini file.

There is a BlueHost default php.ini file which loads the PDO library. Plopping in a new php.ini -- with the intended purpose of increasing the upload file size -- overrides that. So, the default drivers libraries will not be loaded.

HTH if you run into this problem...