Jump to content

[Solved] PDO Error


forsythe

Recommended Posts

I am getting a "Fatal error: Class 'PDO' not found" where I was not previously.  I had recently moved some code around, but after restoring it I'm still getting this error.  Is there some trick to pointing to the extension properly.  The line causing the fault is:

 

$dbh = new PDO('sqlite:'.$db_name);

 

The php.ini in my root folder has

 

extension = sqlite3.so
extension = pdo_sqlite.so

 

phpinfo has

 

PDO drivers mysql, pgsql, sqlite

 

 

Link to comment
Share on other sites

First of all, I strongly recommend not using sqlite. You'll get much better performance from mysql or postgresql, and a lot less headaches from trying to debug all the issues that sqlite can have like file permissions. But if you insist on using sqlite we do support it.

 

Second of all, we don't support custom php.ini files. If you need something changed in php.ini you won't be able to change it yourself by placing that file. You'll need to request the changes here on the forums.

 

That said, perhaps this will help? https://stackoverflow.com/a/24588129/2336864

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...