#28205 [Opn->Csd]: PHP crashes when using num_rows property
| From: | georg@php.net | Date: | Sat, 05 Jun 2004 18:33:22 +0000 |
| Subject: | #28205 [Opn->Csd]: PHP crashes when using num_rows property | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-60414@lists.php.net to get a copy of this message | ||
ID: 28205
Updated by: georg@php.net
Reported By: marcing at smlw dot pl
-Status: Open
+Status: Closed
Bug Type: MySQL related
Operating System: Win XP
PHP Version: 5.0.0RC2
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2004-04-28 14:55:19] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28205&edit=1