Hi all,
I have ubuntu and just installed sqlite then edit the php.ini file accordingly but for some reason the class named ¨SQLiteDatabase()¨ reports as undefined. The error is as follows:
Fatal error: Uncaught exception 'SQLiteException' with message 'SQLiteDatabase::__construct() [<a href='sqlitedatabase.--construct'>sqlitedatabase.--construct</a>]: unable to open database: /var/www/vhosts/cwarn23/base' in /var/www/vhosts/cwarn23/php.php:3 Stack trace: #0 /var/www/vhosts/cwarn23/php.php(3): SQLiteDatabase->__construct('base', 438, 'unable to open ...') #1 {main} thrown in /var/www/vhosts/cwarn23/php.php on line 3
And my script is
<?php
$dbname='base';
$base=new SQLiteDatabase($dbname, 0666, $err);
if ($err)
{
echo "SQLite NOT supported.\n";
exit($err);
}
else
{
echo "SQLite supported.\n";
}
So does anyone know what would make sqlite behave in such a way? Also the tutorial I was following is at http://www.scriptol.com/sql/sqlite-getting-started.php
And yes I tried restarting apache after making changes to php.ini