|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51733 SQLite3::exec() fails with disk I/O error
Submitted: 2010-05-03 22:02 UTC Modified: 2010-05-03 23:20 UTC
From: jay at splitstreams dot com Assigned:
Status: Not a bug Package: SQLite related
PHP Version: 5.3.2 OS: Ubuntu 10.04, FreeBSD 8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jay at splitstreams dot com
New email:
PHP Version: OS:


 [2010-05-03 22:02 UTC] jay at splitstreams dot com
I've tested this problem and it is duplicable on Ubuntu 10.04 and FreeBSD 8, both with 5.3.2 installed (from apt-get/ports).  I also did a build of 5.3.2 from source to test this and it failed in the same way.

The problem comes when you try to create a table in a newly created database when using the SQLite3 class.  The empty db is created without error and when you then try to create a table, you get the following error:

PHP Warning:  SQLite3::exec(): disk I/O error in php shell code on line 1

This is the same error in all builds on all OSes.

Test script:
$ php -a

php > $s = new SQLite3('/home/jdeiman/tmp/php.db',  SQLITE3_OPEN_CREATE);
php > $ret = $s->exec('CREATE table testing (id integer)');
PHP Warning:  SQLite3::exec(): disk I/O error in php shell code on line 1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-03 23:20 UTC]
-Status: Open +Status: Bogus
 [2010-05-03 23:20 UTC]
You need to pass SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE to the ctor if you intend on writing to the database after creating it... or you can leave the flags parameter blank and it will default to that.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 05:01:29 2024 UTC