From: [EMAIL PROTECTED]
Operating system: Win2000/XP
PHP version: 4.2.3
PHP Bug Type: COM related
Bug description: COM memory leak
following script causes increasing memory leak in php.exe and excel.exe:
//**************************
$strfilename = ".\\test.xls";
$strfilename = realpath($strfilename);
set_time_limit(0);
$exapp = new COM("Excel.application") or Die ("Did not connect to
Excel");
if (file_exists($strfilename))
{
$wkb = $exapp->Workbooks->open($strfilename);
for ($i=0; $i<10000000; $i++)
{
$Sheet = $wkb->Worksheets(1);
$egal = $Sheet->Cells(1,1);
$egal->value = 100;
}
$wkb->Save();
$wkb->close(false,$strfilename,false);
}
$exapp->Quit();
$exapp->Release();
//**************************
if the lines:
$egal = $Sheet->Cells(1,1);
$egal->value = 100;
will be deleted, only php.exe show the increasing memory leak.
--
Edit bug report at http://bugs.php.net/?id=20282&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20282&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20282&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20282&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20282&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20282&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20282&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20282&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20282&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20282&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20282&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20282&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20282&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20282&r=isapi