ID:               28537
 Updated by:       [EMAIL PROTECTED]
 Reported By:      bhoc at tiscali dot ch
-Status:           Open
+Status:           Feedback
 Bug Type:         SQLite related
 Operating System: any
 PHP Version:      5.0.0RC2
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


Previous Comments:
------------------------------------------------------------------------

[2004-05-27 01:44:37] bhoc at tiscali dot ch

before someone asks: same behaviour with
http://snaps.php.net/win32/php5-win32-200405262230.zip

------------------------------------------------------------------------

[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

Reply via email to