From:             csaba at alum dot mit dot edu
Operating system: Win 2K Pro
PHP version:      5CVS-2004-04-22 (dev)
PHP Bug Type:     SQLite related
Bug description:  sqlite_query() crashing apache on malformed query

Description:
------------
apache dies on an empty query (Apache.exe has generated errors and will be
closed by Windows ...).

Note that it does not die if the second line in the code below is missing
[sqlite_query ($db, "create table frob ..." ].  Also, sqlite_query did
OK.

Csaba Gabor

PS.  Note that this appears similar to bug 25502 at
http://bugs.php.net/bug.php?id=25502

Reproduce code:
---------------
if (!($db = sqlite_open(":memory:", 666, $error))) die ("Couldn't open the
database");
sqlite_query($db, "create table frob (foo INTEGER PRIMARY KEY, bar
text);");
$res = sqlite_array_query($db, "");
print "passed";


Expected result:
----------------
I wouldn't expect more than a warning.  Taking the entire server down
seems extreme.


-- 
Edit bug report at http://bugs.php.net/?id=28112&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28112&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28112&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28112&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28112&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28112&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28112&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28112&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28112&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28112&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28112&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28112&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28112&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28112&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28112&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28112&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28112&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28112&r=float

Reply via email to