ID:               38134
 Updated by:       [EMAIL PROTECTED]
 Reported By:      gerome dot fournier at infomaniak dot ch
-Status:           Open
+Status:           No Feedback
 Bug Type:         XSLT related
 Operating System: Debian Sarge
 PHP Version:      4.4.2
 New Comment:

Can't reproduce.


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

[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");

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

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

[2006-07-26 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2006-07-18 14:49:08] gabriel dot zerbib at protilab dot com

The same test data (XML & XSL) in same context (same PHP application,
same version) work and do not fail on Windows XP & IIS, whereas I
experience the same problem on submitter's platform.

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

[2006-07-18 14:14:50] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.



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

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