php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28205 PHP crashes when using num_rows property
Submitted: 2004-04-28 14:55 UTC Modified: 2010-12-20 11:42 UTC
From: marcing at smlw dot pl Assigned: jani (profile)
Status: Closed Package: MySQL related
PHP Version: 5.0.0RC2 OS: Win XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: marcing at smlw dot pl
New email:
PHP Version: OS:

 

 [2004-04-28 14:55 UTC] marcing at smlw dot pl
Description:
------------
Use of $result->num_rows in any case causes PHP/Apache crash.

Env:
Windows XP
Apache 2.0.48
MySQL 4.1.2 alpha
PHP RC2 (in previous releases the bug also existed)

php.ini:

zend.ze1_compatibility_mode = Off
allow_call_time_pass_reference = Off
error_reporting  =  E_ALL
register_argc_argv = Off
extension_dir = "./"

extension=php_mysqli.dll
extension=php_mysql.dll
extension=php_gd2.dll
extension=php_imap.dll
extension=php_tidy.dll





Reproduce code:
---------------
if($stmt = $sql->prepare('...')) {
    $stmt->bind_param('s', $s);
    $s = 'cat';
    $stmt->execute();

    $stmt->num_rows;
    OR
    if($stmt->num_rows > 0) {

In other words, any use of num_rows.


Expected result:
----------------
I expect that no crash will happen:)

Actual result:
--------------
Internal Server Error

Error report:
szAppName : php-cgi.exe     szAppVer : 5.0.0.0     szModName : php_mysqli.dll
szModVer : 5.0.0.0     offset : 000094b6

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-05 20:33 UTC] georg@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2010-12-20 11:42 UTC] jani@php.net
-Package: Tidy +Package: MySQL related -Assigned To: +Assigned To: jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC