ID:               38134
 User updated by:  gerome dot fournier at infomaniak dot ch
 Reported By:      gerome dot fournier at infomaniak dot ch
-Status:           Feedback
+Status:           Open
 Bug Type:         XSLT related
 Operating System: Debian Sarge
 PHP Version:      4.4.2
 New Comment:

You can get the details about this server using the following URL:

http://imu60.infomaniak.ch/phpinfo.php

We're using sablotron version 1.0 as provided by Debian sarge, and the
configure command line is the following:

'./configure' '--disable-all' '--prefix=/opt/php'
'--with-apxs=/opt/apache/bin/apxs' '--disable-ipv6' '--with-pear'
'--enable-xml' '--with-expat-dir=/usr' '--with-pcre-regex'
'--enable-memory-limit' '--enable-ftp' '--with-mysql=/opt/misc/mysql'
'--with-zlib-dir=/usr' '--with-openssl=/usr' '--with-zlib=/usr'
'--enable-bcmath' '--enable-calendar' '--enable-ctype'
'--with-curl=/usr' '--with-dom' '--with-dom-xslt' '--with-dom-exslt'
'--enable-exif' '--with-gd' '--with-jpeg-dir' '--with-png-dir'
'--with-xpm-dir' '--with-ttf' '--with-freetype-dir'
'--enable-gd-native-ttf' '--with-gettext' '--with-iconv' '--with-imap'
'--with-kerberos' '--with-imap-ssl' '--enable-mbstring'
'--enable-mbregex' '--with-mcal=/usr' '--with-mcrypt' '--with-mhash'
'--enable-overload' '--enable-posix' '--enable-session'
'--enable-tokenizer' '--enable-wddx' '--enable-xml' '--enable-xslt'
'--with-xslt-sablot=/usr' '--with-zip' '--with-pdflib=/opt/misc/pdflib'
'--with-tiff-dir=/usr' '--with-ming=/opt/misc/ming'

I don't have a more detailed GDB backtrace to provide for the moment.


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

[2006-08-17 10:01:09] [EMAIL PROTECTED]

What is the version of Sablotron used?
Are you able to get a decent GDB backtrace (using PHP configured with
--enable-debug)?
What was your full configure line?

It works just fine here with 1.0.1 & Linux i386.

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

[2006-08-17 09:48:45] gabriel dot zerbib at protilab dot com

I'm sorry Tony, you were a little bit quick in closing with "can't
reproduce".

You can just try the online demo. You'll manage to achieve the 100
iterations for some time, but if you hit Refresh a few times, you sure
will run into the problem: the page will not come to you, your browser
will report some proxy error or some "Host not found" error, which is
in fact caused by a violent crash of the PHP script and PHP
interpreter, never returning a response to your browser.

Please do not close this bug report too fast, as sample data were
properly provided, and the target platform and system and version.

Thanks.

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

[2006-08-17 09:43:05] [EMAIL PROTECTED]

Can't reproduce.

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

[2006-08-17 09:42:11] gerome dot fournier at infomaniak dot ch

Re-opened as the owner of the web site provided new feedbacks.

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

[2006-08-17 09:22:12] gabriel dot zerbib at protilab dot com

TEST DATA:

The files can be found at:
http://www.protilab.com/test/sample.xml
http://www.protilab.com/test/sample.xsl

And the PHP script can be run online at:
http://www.protilab.com/test/sample.php


SCENARIO:
An XSLT processor is instanciated using the XML and XSL files specified
in the arguments, in a loop of 100 iterations.
Among these 100 iterations, a seg-fault is likely to happen.



XML file to process (sample.xml):
---------------------------------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="sample.xsl"?>

<root>
        <node1 id="foo">
                <subnodeA>Some Data A</subnodeA>
                <subnodeA attr="123">Some Mode Data A</subnodeA>
        </node1>
        <node1 id="bar">
                <subnodeA>Some Data A in another node</subnodeA>
                <subnodeA attr="345">Some Mode Data in second node</subnodeA>
        </node1>
</root>
---------------------------------------------------


XSL file to apply (sample.xsl):
---------------------------------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

        <xsl:template match="/">
                <html>
                        <head>
                                <title>Title here</title>
                        </head>

                        <body>
                                <xsl:for-each select="/root/node1">
                                        <xsl:value-of select="@id"/>
                                        <ul>
                                                <xsl:for-each select="subnodeA">
                                                        <li><xsl:value-of 
select="text()"/> <xsl:if test="@attr"> (
<xsl:value-of select="@attr"/> ) </xsl:if> </li> 
                                                </xsl:for-each>
                                        </ul>
                                </xsl:for-each>
                        </body> 
                </html>
        </xsl:template>

</xsl:stylesheet>
---------------------------------------------------


PHP script (sample.php)
---------------------------------------------------
<?
$xmlFile = 'sample.xml';
$xsl_url = 'sample.xsl';


for($i = 0; $i < 100; ++$i)
{

        $xh = xslt_create();
        xslt_set_encoding($xh, 'iso-8859-1');
        xslt_process($xh, $xmlFile, $xsl_url, 'result.html');
        xslt_free($xh);
        
        echo("iteration: $i = OK <br/>\n");

}
?>
---------------------------------------------------

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

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/38134

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

Reply via email to