|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-08-20 12:37 UTC] mcnuke at gmx dot net
[2004-08-20 12:45 UTC] derick@php.net
[2004-08-20 12:52 UTC] georg@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 05:00:01 2025 UTC |
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