From: fernando dot wendt at gmail dot com Operating system: Windows 2000 Professional PHP version: 5.0.3 PHP Bug Type: SQLite related Bug description: PHP doesn´t open the database file from SQLite 3.0.8
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 bug report at http://bugs.php.net/?id=31848&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31848&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31848&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31848&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31848&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31848&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31848&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31848&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31848&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31848&r=support Expected behavior: http://bugs.php.net/fix.php?id=31848&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31848&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31848&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31848&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31848&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31848&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31848&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31848&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31848&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31848&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31848&r=mysqlcfg