Jump to content

Recommended Posts

Posted

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

 

 

Posted

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

Posted

Thanks, I had inadvertently uploaded a php.ini file from another hosting service, which was apparently being read, so my extensions directory was invalid.  I delete the file, and everything came back online.  

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...