|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 22:00:01 2025 UTC |
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?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