Why class 'SQLiteDatabase' is not found in /var/www/*.php?

Posted by Roman on Server Fault See other posts from Server Fault or by Roman
Published on 2010-02-28T10:49:49Z Indexed on 2010/03/26 2:03 UTC
Read the original article Hit count: 465

Filed under:
|

I am trying to use sqlite from PHP. I have the following simple code:

<?php
$db = new SQLiteDatabase("test2.sdb");
unset($db);
?>

As the result of this code (which I execute in the command line "php test2.php") I get:

Fatal error: Class 'SQLiteDatabase' not found in /var/www/test2.php on line 3

Does anybody know how can I make PHP able to use sqlite?

P.S. Here I found out that "SQLite support is enabled by default on a standard Linux PHP compilation starting with PHP 5.0." And I have "PHP Version => 5.2.6-2ubuntu4.6". So, sqlite should be enabled unless the "--disable-sqlite". In my case output of "phpinfo();" does not contain "sqlite" at all.

© Server Fault or respective owner

Related posts about php

Related posts about sqlite