|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-04-19 18:04 UTC] D dot Kingma at jool dot nl
Description: ------------ When replacing XsltProcessor with XslCache initialisation and importStylesheet work ok, but when executing the transformation it throws a segmentations fault. I have removed any xdebug/zend debugger / apc extension, but it still throws a segfault. We used the 'pecl install xslcache' to install the module Might be the same issue as the translit extension in #15627 PHP ini portion: *xsl* XSL enabled libxslt Version 1.1.22 libxslt compiled against libxml Version 2.6.31 EXSLT enabled libexslt Version 1.1.24 *xslcache* XSLCACHE enabled libxslt Version 1.1.22 libxslt compiled against libxml Version 2.6.31 EXSLT enabled libexslt Version 1.1.22 Expected result: ---------------- Valid transformation output Actual result: -------------- child pid 13906 exit signal Segmentation fault (11) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 06:00:02 2025 UTC |
The bug is specific when you return a DOMElement from a registered php function. Reproduction case: xslcachetest.php: <?php function callXML() { $d = new domDocument(); $d->loadXML('<ipub:result xmlns:ipub="http://wwwwww.wwwww.wwwww/sisisiis">yeah</ipub:result>'); return $d->documentElement; } $dom = new domDocument; $dom->loadXML('<?xml version="1.0" encoding="iso-8859-1" ?><chapter language="en"></chapter>'); if(!$dom) { echo "Error while parsing the document\n"; exit; } $xsl = dirname(__FILE__)."/xslcachetest.xsl"; $orginalProcessor = false; if($orginalProcessor) { $xslDoc = new domDocument; $xslDoc->load($xsl); $proc = new xsltprocessor; $proc->importStylesheet($xslDoc); } else { $proc = new xsltcache; $proc->importStylesheet($xsl); } if(!$proc) { echo "Error while making xsltprocessor object\n"; exit; } $proc->registerPHPFunctions('callXML'); print "\nhere"; print $proc->transformToXml($dom); print "\nend"; xslcachetest.xsl <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl"> <xsl:output method="xml" indent="no"/> <xsl:template match="/"> <html><body> <xsl:value-of select="php:function('callXML')"/> </body></html> </xsl:template> </xsl:stylesheet>