ID:               29974
 Comment by:       splash2 at splashtech dot net
 Reported By:      david dot powers at dial dot pipex dot com
 Status:           Feedback
 Bug Type:         MySQLi related
 Operating System: Windows XP
 PHP Version:      5.0.1
 New Comment:

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. :)


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

[2004-09-15 09:30:27] [EMAIL PROTECTED]

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

Reply via email to