From: [EMAIL PROTECTED]
Operating system: windows2000 pro
PHP version: 4.1.2
PHP Bug Type: Performance problem
Bug description: unlink() is causing php.exe process to keep running
Here is the code:
$oDelete = explode(",", $HTTP_GET_VARS["nodeId"]);
$intDelete = count($oDelete);
$xmlDoc = @xmldocfile($xmlDataPath) or die("Couldn't get XML data");
$nodeRoot = $xmlDoc->root();
$childNodes = $nodeRoot->children();
echo $childNodes;
for ($i=0; $i < $intDelete; $i++){
$childNodes[$oDelete[$i]]->unlink();
}
$strWrite = domxml_dumpmem($xmlDoc);
$xmlFile = fopen($xmlDataFile,"w");
fwrite($xmlFile,$strWrite);
fclose($xmlFile);
exit;
OK, when $childNodes[$oDelete[$i]]->unlink();
gets executed it starts a system process php.exe. This process never
ends. It deletes the node and writes the file but the process keeps
running. If you delete another node by running unlink() again it starts a
new php.exe process and that one keeps running.
Any ideas of other ways to remove a node from a xml file??
--
Edit bug report at http://bugs.php.net/?id=16154&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16154&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16154&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16154&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16154&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16154&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16154&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16154&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16154&r=submittedtwice