ID: 31848 Updated by: [EMAIL PROTECTED] Reported By: fernando dot wendt at gmail dot com -Status: Open +Status: Bogus Bug Type: SQLite related Operating System: Windows 2000 Professional PHP Version: 5.0.3 New Comment:
No bug, PHP uses the SQLite 2.x library which ofcourse can not read SQLite 3 formatted files. (You can have a look at PDO's SQLite3 driver though). Previous Comments: ------------------------------------------------------------------------ [2005-02-04 18:34:17] fernando dot wendt at gmail dot com Description: ------------ Hi, I have downloaded the SQLite 3.0.8 for Windows, and it seems to work fine: via prompt, database created, data inserted, dump done, imports and outputs made. Then, when trying to make it really works, whith PHP 5.0.3 and Apache 2.0.52, always PHP points an error, that saids "file is not a database or is encrypted". To make this really hapends, and what motivated me to came here, i get SQLite 2.8.15, created the same database (all right), and with this version PHP works. The table is very simple: itīs name "tabela", and have two columns "numero" and "nome" (smallint and varchar). Two data inserted: 1-Fernando and 2-Nidiane. Thats all. Reproduce code: --------------- <?php $banco = new SQLiteDatabase("exemplo.sqi"); $res = $banco->unbufferedQuery("Select * from tabela"); foreach ($res as $row){ print_r($row); } ?> Expected result: ---------------- Array ( [0] => 1 [numero] => 1 [1] => Fernando [nome] => Fernando ) Array ( [0] => 2 [numero] => 2 [1] => Nidiane [nome] => Nidiane ) Actual result: -------------- Warning: SQLiteDatabase::unbufferedQuery() [function.unbufferedQuery.html]: no such table: tabela in C:\Arquivos de programas\Apache Group\Apache2\htdocs\sqlite\exemplo.php on line 3 Warning: Invalid argument supplied for foreach() in C:\Arquivos de programas\Apache Group\Apache2\htdocs\sqlite\exemplo.php on line 4 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31848&edit=1