From: cw at centerwave dot de Operating system: Windows 2000, WindowsXP PHP version: 5CVS-2003-07-13 (dev) PHP Bug Type: XSLT related Bug description: PHP crashes after serveral realods of script that uses importstylesheet()
Description: ------------ PHP (and Apache) crashes after running the importstylesheet()-function on an domdocument serveral times (means serveral reloads of the same script, not use of this function serveral times in the same script). If the XSL-input is large (> 50kb) PHP crashes after 3-5 site reloads. If the XSL-input is small it seems that PHP crashes after 10-20 site reloads. The very strange thing is that it renders the page with the *same* XSL/XML-input serveral times without problems before crashing after a certain amount of realods. It seems not to be important what XSL-ruleset is used. I tested serveral xsl-inputs and it always died. It crashes just on Windows (Apache and Apache 2). I used the libxml that came with PHP as well as the latest from xmlsoft.org. There are no problems under Linux. Reproduce code: --------------- Example 1: $output is the XML-string (sorry this is very long so I can't post it, but the xml-string is not import to reproduce to error, as well as the XSL-string isn't) $processor = new xsltprocessor(); $xml = new domdocument(); $xsl = new domdocument(); $xsl_filecontent = file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/evolution/gui/" . $passport->get_design("current") . "/html.xsl"); $xsl->loadxml($xsl_filecontent); $xml->loadxml($output); $processor->importstylesheet($xsl); print ($processor->transformtoxml($xml)); Example 2: It also crashes when using the example at http://news.php.net/article.php?group=php.xml.dev&article=148 Expected result: ---------------- transformed xml output Actual result: -------------- Sorry I can't give you a backtrace with my windows-system. I can just tell you that the last call goes to libxml2.dll. -- Edit bug report at http://bugs.php.net/?id=24634&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24634&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24634&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24634&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24634&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24634&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24634&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24634&r=support Expected behavior: http://bugs.php.net/fix.php?id=24634&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24634&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24634&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24634&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24634&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24634&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24634&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24634&r=gnused