ID: 37644 Updated by: [EMAIL PROTECTED] Reported By: php at tothebrim dot net -Status: Open +Status: Feedback Bug Type: SimpleXML related Operating System: Windows XP Professional PHP Version: 5.1.4 New Comment:
Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2006-05-30 16:42:59] php at tothebrim dot net Description: ------------ This code works perfectly in version 5.1.2. I needed to upgrade in order to make use of simpleXMLElement->addChild and simpleXMLElement->addAttribute I have attempted this with 5.1.3, 5.1.4 and 5.2 with Apache 2.0.58 and 5.2 and 6.0 with Apache 2.2 and the same problem occurs each time. Max process time is exceeded, when I trace the problem I find that the same value is returned repeatedly in foreach. I have some foreach statements that continue to work, even using a SimpleXMLElement, but others fail every time. Reproduce code: --------------- function save_inputs($filename) { $doc = simplexml_load_file($filename); print "27<br/>"; foreach($doc as $key=>$value) { print "29<br/>"; if (sizeof($value->children()) && $value['type'] == "1") { print "31<br/>"; $value['combine'] = $_POST["combine~$key"]; print "33<br/>"; process_rows($doc,$key, $value); print "35<br/>"; } elseif($value['type'] == "1") { print "37<br/>"; post_child_row($doc, $key, $value); print "39<br/>"; } } $doc->asXML($filename); } Expected result: ---------------- Max Process Time Exceeded Actual result: -------------- Complete the foreach ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37644&edit=1