|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31848 PHP doesn�t open the database file from SQLite 3.0.8
Submitted: 2005-02-04 18:34 UTC Modified: 2005-02-07 03:33 UTC
From: fernando dot wendt at gmail dot com Assigned:
Status: Not a bug Package: SQLite related
PHP Version: 5.0.3 OS: Windows 2000 Professional
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
21 + 15 = ?
Subscribe to this entry?

 [2005-02-04 18:34 UTC] fernando dot wendt at gmail dot com

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:
  $banco = new SQLiteDatabase("exemplo.sqi");
  $res = $banco->unbufferedQuery("Select * from tabela");
  foreach ($res as $row){

Expected result:
    [0] => 1
    [numero] => 1
    [1] => Fernando
    [nome] => Fernando
    [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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-05 01:29 UTC]
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).
 [2005-02-07 03:33 UTC] fernando dot wendt at gmail dot com
OK, thank you for the information.

I sugest to put it on the docs page, to explain better this version dependece feature about this module.

Best regards,

Fernando Wendt
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Feb 01 07:05:52 2023 UTC