#28205 [NEW]: PHP crashes when using num_rows property

From: Date: Wed, 28 Apr 2004 12:55:21 +0000
Subject: #28205 [NEW]: PHP crashes when using num_rows property
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-58944@lists.php.net to get a copy of this message
From: marcing at smlw dot pl Operating system: Win XP PHP version: 5.0.0RC2 PHP Bug Type: MySQL related Bug description: PHP crashes when using num_rows property 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 -- Edit bug report at http://bugs.php.net/?id=28205&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28205&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28205&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28205&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28205&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28205&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28205&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28205&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28205&r=support Expected behavior: http://bugs.php.net/fix.php?id=28205&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28205&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28205&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28205&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28205&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28205&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28205&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28205&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28205&r=float

« previous php.bugs (#58944) next »