How can I use and access an SQLite DB using PHP and Wamp Server?

database, pdo, php, sqlite, windows

Solution

I think the class `SQLiteDatabase` is from the extension `sqlite` rather `pdo_sqlite`. So you could enable the `sqlite` extension, or use PDO instead:

<?php
$conn = new PDO('sqlite:c:/mydb.sq3');
$conn->exec('some sql query');

Problem

I know PHP 5 already supports SQLite but for some reason I can't get it to work. I followed the instructions from SQLite tutorial: Getting started. I also made sure that the following are not commented out from php.ini: ``` extension=php_pdo_sqlite.dll extension=php_sqlite.dll. ``` But when I open the PHP file from localhost using Firefox, I get this error: Fatal error: Class 'SQLiteDatabase' not found. I'm on Windows by the way, if that info matters. What may be the cause of this problem?

Original source