Bug #16154 Updated: unlink() is causing php.exe process to keep running

From: Date: Mon, 18 Mar 2002 22:53:09 +0000
Subject: Bug #16154 Updated: unlink() is causing php.exe process to keep running
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-2807@lists.php.net to get a copy of this message
ID: 16154 Updated by: sniper@php.net Reported By: kdesormeaux@atre.net Status: Open -Bug Type: Performance problem +Bug Type: DOM XML related Operating System: windows2000 pro PHP Version: 4.1.2 New Comment: reclassified Previous Comments: ------------------------------------------------------------------------ [2002-03-18 17:51:53] kdesormeaux@atre.net Windows2000 pro 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?? ------------------------------------------------------------------------ [2002-03-18 17:50:34] kdesormeaux@atre.net 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 this bug report at http://bugs.php.net/?id=16154&edit=1

« previous php.bugs (#2807) next »