php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22137 xslt_process hangs with sort.
Submitted: 2003-02-09 07:50 UTC Modified: 2003-02-20 08:11 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: p dot vangils at mycoweb dot nl Assigned:
Status: No Feedback Package: XSLT related
PHP Version: 4.3.0 OS: Linux
Private report: No CVE-ID: None
 [2003-02-09 07:50 UTC] p dot vangils at mycoweb dot nl
I used <xsl: sort select="number"> in my xsl file.
I used an empty tag <number></number> in my xml file.

I understand that sorting on an empty xml tag is very difficult but i didn't expect the xslt_process function to hang.

Of course where <number></number> is filled in everything works fine.

It should be better to give an error or place the empty tags in the beginning or in the end. Hangup cost server performance i think.

With kind regards,

Paul van Gils



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-09 16:24 UTC] msopacua@php.net
Is this reproducable with sabcmd?

If not, please provide sample files. If they're long, post a url where they can be downloaded.
 [2003-02-09 18:03 UTC] p dot vangils at mycoweb dot nl
Thanks for your reply.
I made a script to reproduce the problem. 
On php version 4.2.1 on windows it works fine.
On php version 4.3.0 on linux it will hang.


With kind regards,
Paul van Gils


<?php

  $xml="<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>".
       "<articlelist>".
       "<articles>".
       "<article>".
       "<text1>Hello world!</text1>".
       "<number></number>".
       "</article>".
       "</articles>".
       "</articlelist>";



  $xsl="<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n".
       "<xsl:stylesheet version=\"1.0\"\n".
       "xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"\n".
       "xmlns:fo=\"http://www.w3.org/1999/XSL/Format\">\n".
       "<xsl:output method=\"html\"/>\n".
       "<xsl:template match=\"/\">\n".
       "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n".
       "<xsl:for-each select=\"articlelist/articles/article\">\n".
       "<xsl:sort select=\"number\"/>\n".
       "<tr>\n".
       "<td valign='top'>\n".
       "Hello world!\n".
       "</td>\n".
       "</tr>\n".
       "</xsl:for-each>\n".
       "</table>\n".
       "</xsl:template>\n".
       "</xsl:stylesheet>\n";

  // $xml and $xsl contain the XML and XSL data
     $arguments = array(
        '/_xml' => $xml,
        '/_xsl' => $xsl
     );

     // Allocate a new XSLT processor
     $xh = xslt_create();
     $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments);

    echo "<html><body>Gereed</body></html>";


?>
 [2003-02-10 09:52 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Cannot replicate the bug using the latest snapshot.
 [2003-02-10 16:47 UTC] msopacua@php.net
Please also report the Sablotron version you're using and whether wchar.h is present on your system?
 [2003-02-10 18:16 UTC] p dot vangils at mycoweb dot nl
I'm using Sablotron version 0.97.

I don't know if wchar.h is present on my system because the error occured on the machine of my ISP.
 [2003-02-10 19:08 UTC] msopacua@php.net
If you're using Sablotron 0.97 there should be a section on how Sablotron was configured in phpinfo() output.

Could you paste that as well as the output of the 'Configure command'? There's something really off here, since neither ilia nor me can reproduce what you're seeing, on totally different systems. Could you confirm if the ISP is WideXs (I might be able to get a shell on such a box then)?
 [2003-02-20 08:11 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 17:01:31 2024 UTC