#29974 [Fbk->NoF]: num_rows crashes Apache (recurrence)  
Author Message
php-bugs





PostPosted: 2004-9-23 7:00:13 Top

php-dev, #29974 [Fbk->NoF]: num_rows crashes Apache (recurrence) ID: 29974
Updated by: email***@***.com
Reported By: david dot powers at dial dot pipex dot com
-Status: Feedback
+Status: No Feedback
Bug Type: MySQLi related
Operating System: Windows XP
PHP Version: 5.0.1
New Comment:

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


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

[2004-09-20 01:31:27] splash2 at splashtech dot net

I also had this issue on php 5.0.1 final release... I downloaded the
latest (at this time) snapshot located at
http://snaps.php.net/win32/php5.0-win32-200409191630.zip.

The issue is resolved in that version. :)

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

[2004-09-15 09:30:27] email***@***.com

Please try using this CVS snapshot:

http://snaps.php.net/php5-STABLE-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5.0-win32-latest.zip



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

[2004-09-03 19:40:11] david dot powers at dial dot pipex dot com

Description:
------------
Bug #28205 reported fixed in PHP 5.RC-3 appears to have resurfaced.

Use of $result->num_rows causes Apache to crash. Use of
mysqli_num_rows() works without problem.

Environment:

Windows XP Pro
Apache 1.3.31
PHP 5.0.1
MySQL 4.1.4-gamma

extension=php_mbstring.dll
extension=php_mysqli.dll
extension=php_mysql.dll

Reproduce code:
---------------
$db = new mysqli($hostname, $username, $password, 'db_name');

$sql = 'SELECT * FROM wordlist';
$result = $db->query($sql);

$total = $result->num_rows;
echo "<h1>Total words: $total</h1>";
while ($row = $result->fetch_assoc()) {
echo $row['word'].'<br />';
}

Expected result:
----------------
I expect it not to crash.

Actual result:
--------------
Error report:

szAppName: Apache.exe szAppVer: 0.0.0.0
szModName: php_mysql.dll szModVer: 5.0.1.1
offset: 000011fe

Code works perfectly if $total = $result->num_rows; is commented out.


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


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