php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30147 Uncaught exception 'SQLiteException' appears randomly
Submitted: 2004-09-19 00:42 UTC Modified: 2004-09-26 03:45 UTC
Votes:6
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:1 (25.0%)
From: gurugeek@php.net Assigned:
Status: Closed Package: SQLite related
PHP Version: 5CVS-2004-09-19 (dev) OS: Free BSD
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gurugeek@php.net
New email:
PHP Version: OS:

 

 [2004-09-19 00:42 UTC] gurugeek@php.net
Description:
------------
This is fairly odd. Randomly PHP 5 will throw and
SQLiteException in code which does not use sqlite code 
at all, nor, as reported in the example below, uses $var 
(and this server is not running with E_STRICT error 
reporting).

sample error:

Fatal error: Uncaught exception 'SQLiteException' with 
message 'var: Deprecated. Please use the public/private/
protected modifiers' in /usr/college/home/
public_html/tickets.php:3 Stack trace: #0 {main} thrown 
in /usr/college/home/public_html/tickets.php on 
line 3

This type of fatal error "Uncaught exception 
'SQLiteException' " appears randomly so it is really 
hard to reproduce. It has no ties with the code or the 
line where the uncaught exception occurrs.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-25 03:48 UTC] gurugeek@php.net
Okay, I found a way to reproduce this behavior.

In one of your browsers tabs please load
http://www.dotgeek.org/php5crash/DBCsample.php
for a couple of times or more.

on another tab load this page
http://dotgeek.org/forums/ which uses PHP 4 code (working fine on PHP5 under non E_STRICT setting). 

Now, if you load for a while both pages, first and second (sorry it might sounds crazy, but as a random bug, it is kinda hard to reproduce) you will see the PHP 4 code page (this happens with PHP5 code too but somehow was easier to reproduce with a PHP 4 code) crashing as per this image
http://www.dotgeek.org/php5crash/bug.jpg

note that the files on /forums/  do not use Sqlite but the page dies for an uncaught SqliteException. 

Once the crash occurs, it will appear randomly on several different pages, the only similarity is the stacktrace #0.

Let me know if I can be of any further assistance.
 [2004-09-25 16:40 UTC] nforbes@php.net
I can confirm this happening on the dotgeek.org servers (see http://www.compasstools.net/images/bug30147.png).

The lines on which the errors have occurred are, again, seemingly random. Line 120 of index.php is a blank line.
 [2004-09-25 16:47 UTC] jordanf at dotgeek dot org
I get these same errors also -- on pages not related to SQLite at all.

http://jordanf.dotgeek.org/files/bug1.jpg
http://jordanf.dotgeek.org/files/bug2.png
 [2004-09-25 16:47 UTC] nforbes@php.net
In response to the screenshot I just posted, common.php:120 is the following:

include($phpbb_root_path . 'includes/template.'.$phpEx);
 [2004-09-26 01:12 UTC] thesaur@php.net
David mentioned this on irc, so I felt I needed to try it immediately on my local installation: Windows XP Home running php5.01 as an Apache2 (2.0.49) module.

What is needed to duplicate this is a simple php and a sqlite database. I have zipped them and they are available here:
http://thesaur.dotgeek.org/bug30147.zip

Here's a screenshot of the output:
http://thesaur.dotgeek.org/bug30147.gif

It seems to be limited to when the secondary page contains code that is not E_STRICT compliant, as noted already. Indeed it seems that a class declaration is required (this was tested).
 [2004-09-26 01:24 UTC] wez@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2004-09-26 03:45 UTC] wez@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed in PHP_5_0 and HEAD.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 16:01:33 2024 UTC