ID:               16888
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Feedback
 Bug Type:         DOM XML related
 Operating System: Windows XP
 PHP Version:      4.2.0
 New Comment:

even with the new php_domxml.dll it still crashes 

also when you use the correct new function 
append_sibling() it still crashes, even worser when you forget to add
content to your nodes as in the example above apache crashes in a loop
until the timeout is reached and no output reaches the browser.

<?
$doc = domxml_new_doc("1.0");
$root = $doc->create_element("HTML");
$root = $doc->append_child($root);
$body = $doc->create_element("element");
$body = $root->append_child($body);
//$body->set_content("content");

for($i = 1; $i < 130; $i++){
   $element = $doc->create_element("element");
   //$element->set_content("content ".$i);
  $body->append_sibling($element);
}

echo htmlentities($doc->dump_mem(true));
?>


Previous Comments:
------------------------------------------------------------------------

[2002-05-16 11:06:57] [EMAIL PROTECTED]

I'm looking into it.  No guarantees though.  I tried it with IIS, and
it seemed to work ok (Well the domxml part), it just crashed later.

I'm installing Apache to see if I can reproduce the problem/fix it.

------------------------------------------------------------------------

[2002-05-16 09:07:01] [EMAIL PROTECTED]

Edin created a new php_domxml.dll with libxml2-2.4.21 compile d in.
It's available at
http://ftp.proventum.net/pub/php/win32/php_domxml.zip

Can you check that. But i fear, it doesn't help solve the problem :(
Please be aware, that append_child changed the meaning in 4.2.1. The
former append_child is now append_sibling, and append_child behaves
like the w3c likes it. But appending a sibling to the root node,
doesn't make really sense, but it souldn't crash PHP, either :)

I would be very glad, if someone with windows programming experience
could hunt down the problem.

chregu

------------------------------------------------------------------------

[2002-05-15 17:50:13] [EMAIL PROTECTED]

FWIW, the sample script works ok using the latest HEAD under IIS in
debug mode...well, works is an approximation.  It doesn't crash until
the Zend tries to clean up memory, and then crashes in _zval_ptr_dtor. 
Not feeling like a Zend guru today, I don't feel like attacking it. 
I'll try Apache though to see if I can narrow this bug down.

------------------------------------------------------------------------

[2002-05-15 16:15:27] [EMAIL PROTECTED]

I  tried the newest xml-lib build from
http://www.fh-frankfurt.de/~igor/projects/libxml/ (Version 2.4.21) and
apache still crashes. 

I also can confirm the barrier with 128 elements.

------------------------------------------------------------------------

[2002-05-15 12:28:24] [EMAIL PROTECTED]

One more interesting remark - DOM XML module crashes if more then 128
elements are created. Less then 128 elements are created without
problems. Maybe it will help you somehow?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/16888

-- 
Edit this bug report at http://bugs.php.net/?id=16888&edit=1

Reply via email to