Edit report at https://bugs.php.net/bug.php?id=60265&edit=1

 ID:                 60265
 User updated by:    bugzilla33 at gmail dot com
 Reported by:        bugzilla33 at gmail dot com
 Summary:            'new COM' crash
 Status:             Open
 Type:               Bug
 Package:            COM related
 Operating System:   Windows 7 32bit
 PHP Version:        5.4.0RC1
 Block user comment: N
 Private report:     N

 New Comment:

corrected version:

<?php
 $z=50;while($z--){

  $o=new COM('WinMgmts:',null,CP_UTF8);
  foreach($o->ExecQuery('SELECT * FROM Win32_OperatingSystem') as $x){
   $s=$x->Caption;
  }

 }

 print($s);
?>


Previous Comments:
------------------------------------------------------------------------
[2011-11-12 09:34:03] bugzilla33 at gmail dot com

Here you are:

Expected result:
----------------
PHP 5.3.9RC1 prints: Microsoft Windows


Actual result:
--------------
PHP 5.4.0RC1 crash


<?php
 $z=50;while($z--){

  $o=new COM('WinMgmts:',null,CP_UTF8);
  foreach($o->ExecQuery('SELECT * FROM Win32_OperatingSystem') as $x){
   $o=$x->Caption;
  }

 }

 print($o);
?>

------------------------------------------------------------------------
[2011-11-11 22:13:05] fel...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



------------------------------------------------------------------------
[2011-11-11 11:51:45] bugzilla33 at gmail dot com

Description:
------------
Calls to 'new COM' and methods from its object crash PHP!

This bug is introduced in PHP 5.4
PHP 5.3.9RC1 works perfect.

Tested on Windows 7 32 bit + Apache 2.2.21 VC9 from apache longuq + PHP 
5.4.0RC1 VC9 Thread Safe.


Expected result:
----------------
no crash


Actual result:
--------------
crash



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



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

Reply via email to