Page 1 of 1

XmlDom crash my apache

Posted: Fri Jul 05, 2002 4:38 pm
by artois_val
Hello,

Anyone have encoutered this kind of bug, this code crash apache (2 and 1) on an infamouse windows box

$docXml= domxml_new_doc("1.0");
$xRoot = CreateXmlNode($docXml,"xnds:dataset");
$xRoot->set_attribute("name","value");

for($a=0;$a<=3000;$a++) {
$rText = $docXml->create_element("<span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span>");
$rText = $xRoot->append_child($rText);
}

it`s work with low value (in the for) but when it get hight, kaabboom !

I will appreciate any help , thanks

ps. i'm a newbie in php.

Posted: Fri Jul 05, 2002 9:56 pm
by hob_goblin
have you taken into account that you might not have enough RAM to run it?

yes ...

Posted: Sun Jul 07, 2002 11:42 am
by artois_val
Indeed but it's strange that blow up the systeme memory since it shouldn be big.

Posted: Sun Jul 07, 2002 12:52 pm
by chiefmonkey
Did you check the apache error log.

George

yes... but ..

Posted: Sun Jul 07, 2002 4:55 pm
by artois_val
Yes, but it crash and windows report the well know : " memory can't be...."

So no log entry relevent to my error is showed ;(