ID: 16154 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: DOM XML related Operating System: windows2000 pro PHP Version: 4.1.2 New Comment:
Please try a snapshot or CVS version if possible. The unlink code has been modified in CVS and will be in the 4.2 version. Previous Comments: ------------------------------------------------------------------------ [2002-03-18 17:53:08] [EMAIL PROTECTED] reclassified ------------------------------------------------------------------------ [2002-03-18 17:51:53] [EMAIL PROTECTED] 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] [EMAIL PROTECTED] 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