ID:               29771
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mcnuke at gmx dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         Reproducible crash
 Operating System: Debian Sarge Linux Kernel 2.6
 PHP Version:      5.0.1
 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-08-20 12:37:04] mcnuke at gmx dot net

i forgot to say .. i'm using mysql 4.1.3

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

[2004-08-20 12:15:59] mcnuke at gmx dot net

Description:
------------
PHP crashes when calling the num_rows property of a result object:
apache 2.0.50 error log:
[Fri Aug 20 11:57:40 2004] [notice] child pid 17780 exit signal
Segmentation fault (11)


Reproduce code:
---------------
<?php
        $conn = new mysqli('localhost', 'root', '');
        $conn->select_db('test');
        $conn->query("DROP TABLE segfault;");
        $conn->query("CREATE TABLE segfault (id TINYINT NOT NULL, PRIMARY KEY
(id));");
        $res = $conn->query("SELECT * FROM segfault;");
        echo $res->num_rows; // this line causes php to crash
        $conn->close();
?>

Expected result:
----------------
printing a value: 0

Actual result:
--------------
PHP crashes


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


-- 
Edit this bug report at http://bugs.php.net/?id=29771&edit=1

Reply via email to