PHP xsl fails
Ryan Schmidt
ryandesign at macports.org
Thu Jan 17 12:08:38 PST 2008
On Jan 17, 2008, at 13:18, Jonas Munk wrote:
> When trying to use the xsl functions in php from macports install
> like this:
>
> $xslData = '<?xml version="1.0" encoding="ISO-8859-1"?>'.
> '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">'.
> '<xsl:output method="html" indent="no" encoding="ISO-8859-1"/>'.
> '<xsl:template match="/">abc</xsl:template>'.
> '</xsl:stylesheet>';
> $xmlData = '<?xml version="1.0" encoding="ISO-8859-1"?><test/>';
> $xslt = new xsltProcessor;
> $xslt->importStyleSheet(DomDocument::loadXML($xslData));
> $result = $xslt->transformToXML(DomDocument::loadXML($xmlData));
>
> I get this error in the log file (after a few seconds):
>
> [Thu Jan 17 20:09:19 2008] [notice] child pid 13951 exit signal
> Segmentation fault (11)
>
> Does anyone know why this happens.
>
> It works with the PHP standard in leopard and I have been working
> on/using this code for years (also on tiger and panther) using
> other php-dists.
>
> Should I file a bug?
I don't know why this happens. I haven't heard of this problem
before. It doesn't happen for me with php5 @5.2.5_1+apache2+darwin_8
+fastcgi+macosx+mysql5 on Mac OS X 10.4.11 Intel. But you're on
Leopard PowerPC so it might be different.
You could try selfupdating (to make sure you have the latest ports)
and then rebuilding the libxml2, libxslt and php5 ports.
sudo port selfupdate
sudo port -ncuf upgrade libxml2
sudo port -ncuf upgrade libxslt
sudo port -ncuf upgrade php5
If you still have problems with the xslt functions then, you should
file a bug with the PHP team at
http://bugs.php.net/
More information about the macports-users
mailing list