|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-12-14 13:30 UTC] klebermass at limtec dot de
When using the unlink() method the apache proccess always gets a SegFault. an information on what php is running on my maschine http://www.limtec.com:82/info.php PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 08:00:02 2025 UTC |
Sorry i havent been at home the second part of December. Here a sample code: <?php $xmlstruc=xmldoc("<?xml version=\"1.0\" standalone=\"no\" ?><root><down>bla</down></root>"); $xmlnode=$xmlstruc->root(); $xmlchilds=$xmlnode->children(); if(!is_array($xmlchilds)) $xmlchilds=array($xmlchilds); foreach ( $xmlchilds as $workingchild) { $workingchild->unlink();} echo $xmlstruc->dumpmem(); ?> martinThis patch against latest CVS should fix it: (basically it makes domxml not free a node on unlink and rather wait for request shutdown to free a node). btw, this patch also enables a domxml user to re-add a previously unlink()ed node, which is impossible with the current code. regards, -lukas Index: ext/domxml/php_domxml.c =================================================================== RCS file: /repository/php4/ext/domxml/php_domxml.c,v retrieving revision 1.116 diff -u -r1.116 php_domxml.c --- ext/domxml/php_domxml.c 4 Feb 2002 21:07:39 -0000 1.116 +++ ext/domxml/php_domxml.c 19 Feb 2002 18:38:57 -0000 @@ -1801,8 +1801,6 @@ DOMXML_PARAM_NONE(nodep, id, le_domxmlnodep); xmlUnlinkNode(nodep); - xmlFreeNode(nodep); - zval_dtor(id); /* This is not enough because the children won't be deleted */ } /* }}} */