XmlDom crash my apache

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
artois_val
Forum Newbie
Posts: 3
Joined: Fri Jul 05, 2002 4:38 pm

XmlDom crash my apache

Post 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.
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

have you taken into account that you might not have enough RAM to run it?
artois_val
Forum Newbie
Posts: 3
Joined: Fri Jul 05, 2002 4:38 pm

yes ...

Post by artois_val »

Indeed but it's strange that blow up the systeme memory since it shouldn be big.
User avatar
chiefmonkey
Forum Commoner
Posts: 25
Joined: Sat Apr 20, 2002 5:21 am
Location: Glasgow UK

Post by chiefmonkey »

Did you check the apache error log.

George
artois_val
Forum Newbie
Posts: 3
Joined: Fri Jul 05, 2002 4:38 pm

yes... but ..

Post 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 ;(
Post Reply