PHP :: Bug #20282 :: COM memory leak
| Bug #20282 | COM memory leak | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2002-11-06 09:44 UTC | Modified: | 2003-02-08 01:01 UTC |
|
||||||||||
| From: | sven dot packmor at tz-mikroelektronik dot de | Assigned: | ||||||||||||
| Status: | No Feedback | Package: | COM related | |||||||||||
| PHP Version: | 4.2.3 | OS: | Win2000/XP | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2002-11-06 09:44 UTC] sven dot packmor at tz-mikroelektronik dot de
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.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2002-11-06 20:52 UTC] nicos@php.net
[2002-11-07 03:17 UTC] sven dot packmor at tz-mikroelektronik dot de
hi, here my measuring depending on repetitions: 0 1000 2000 10000 excel.exe 7.528K 9.712K 11.600K 26.416K php.exe 5.260K 7.668K 10.148K 30.556K do you need further information?[2002-11-11 12:05 UTC] sven dot packmor at tz-mikroelektronik dot de
[2002-11-17 05:47 UTC] phanto@php.net
[2002-11-18 11:54 UTC] sven dot packmor at tz-mikroelektronik dot de
Yes, i tryed. Using php-cgi.exe instead of php.exe i got php working. Here my measuring depending on repetitions for version 4.3.0 : 0 1000 2000 10000 excel.exe 7.500K 9.708K 11.600K 26.516K php-cgi.exe 5.688K 8.084K 10.612K 29.716K[2002-12-02 03:21 UTC] sven dot packmor at tz-mikroelektronik dot de
[2002-12-02 04:02 UTC] derick@php.net
[2002-12-09 03:21 UTC] sven dot packmor at tz-mikroelektronik dot de
[2002-12-09 15:31 UTC] phanto@php.net
[2002-12-20 11:12 UTC] sven dot packmor at tz-mikroelektronik dot de
[2003-01-18 16:11 UTC] phanto@php.net
[2003-02-08 01:01 UTC] sniper@php.net