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

From: Date: Mon, 24 Jun 2002 05:00:05 +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-11864@lists.php.net to get a copy of this message
ID: 16154 Updated by: php-bugs@lists.php.net Reported By: kdesormeaux@atre.net -Status: Feedback +Status: No Feedback Bug Type: DOM XML related Operating System: windows2000 pro PHP Version: 4.1.2 New Comment: No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". Previous Comments: ------------------------------------------------------------------------ [2002-03-18 17:56:32] jtate@php.net 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. ------------------------------------------------------------------------ [2002-03-18 17:53:08] sniper@php.net reclassified ------------------------------------------------------------------------ [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 (#11864) next »