php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16154 unlink() is causing php.exe process to keep running
Submitted: 2002-03-18 17:50 UTC Modified: 2002-06-24 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: kdesormeaux at atre dot net Assigned:
Status: No Feedback Package: DOM XML related
PHP Version: 4.1.2 OS: windows2000 pro
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-03-18 17:50 UTC] kdesormeaux at atre dot 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??

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-18 17:51 UTC] kdesormeaux at atre dot 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:53 UTC] sniper@php.net
reclassified
 [2002-03-18 17:56 UTC] 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-06-24 01:00 UTC] php-bugs at lists dot php dot net
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".
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Aug 20 14:01:47 2019 UTC