ID: 28537 User updated by: bhoc at tiscali dot ch Reported By: bhoc at tiscali dot ch Status: Open Bug Type: SQLite related Operating System: any PHP Version: 5.0.0RC2 New Comment:
before someone asks: same behaviour with http://snaps.php.net/win32/php5-win32-200405262230.zip Previous Comments: ------------------------------------------------------------------------ [2004-05-27 01:10:36] bhoc at tiscali dot ch Description: ------------ "select rowid, * from someview" will crash php. "select rowid, * from sometable" runs fine. Result -> cgi will crash, server will close the connection. This was a bug (#364) in older sqlite versions: http://www.sqlite.org/cvstrac/tktview?tn=364,16 It seems to have reappeared. -- Ben Reproduce code: --------------- function DumpTable($dbname, $tablename) { if ($db = sqlite_open($dbname)) { $sql = "select rowid, * from $tablename"; $res = sqlite_query($db, $sql); echo "<table border=\"1\">\n"; while ($row = sqlite_fetch_array($res)) { $fieldnum = sqlite_num_fields($res); echo " <tr>"; for ($i=0; $i<$fieldnum; $i++) { echo "<td>$row[$i]</td>"; } echo " </tr>\n"; } echo "</table>\n"; sqlite_close($db); } } Expected result: ---------------- Nicely formatted output. :) Works fine with a plain table; will fail with a view. Actual result: -------------- <nothing>, cgi crashes, server closes connection. Tested under Windows XP and Linux ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28537&edit=1