From: bhoc at tiscali dot ch Operating system: any PHP version: 5.0.0RC2 PHP Bug Type: SQLite related Bug description: "SELECT rowid, * FROM <view>" crashes
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 bug report at http://bugs.php.net/?id=28537&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28537&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28537&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28537&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28537&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28537&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28537&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28537&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28537&r=support Expected behavior: http://bugs.php.net/fix.php?id=28537&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28537&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28537&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28537&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28537&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28537&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28537&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28537&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28537&r=float