Description of problem: You can't open a sqlite database from a php script if the database has been created by the sqlite command. Version-Release number of selected component (if applicable): sqlite-3.3.3-1.2 php-pecl-pdo-sqlite-0.3-4.fc5 Steps to Reproduce: 1. Create a database from the command-line: $ sqlite3 test.sql sqlite> create table test_table(a); 2. Create a php script (script.php): <? $db = new PDO('sqlite:./test.sql'); $query = $db->query('select * from test_table'); $arr = $db->errorInfo(); print_r($arr); ?> 3. Run the script. $ php script.php Actual results: The file format is not recognized. Array ( [0] => HY000 [1] => 1 [2] => unsupported file format ) Expected results: No errors. Array ( [0] => ) Additional info: I think the sqlite pdo module has to be built against the last sqlite libraries.
php-pecl-pdo-sqlite is an old Extras package. Update to "php-pdo" and you'll get the PDO sqlite3 interface, which should work.