php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jay at splitstreams dot com
New email:
PHP Version: OS:

 

 [2010-05-03 22:02 UTC] jay at splitstreams dot com
Description:
------------
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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-03 23:20 UTC] dtajchreber@php.net
-Status: Open +Status: Bogus
 [2010-05-03 23:20 UTC] dtajchreber@php.net
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 Dec 30 14:01:28 2024 UTC