php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24989 PHP 4.3.3RC3 & Sablot 1.0 problem
Submitted: 2003-08-08 15:58 UTC Modified: 2003-08-09 10:41 UTC
From: sitnikov at infonet dot ee Assigned:
Status: Closed Package: XSLT related
PHP Version: 4.3.3RC3 OS: Linux
Private report: No CVE-ID:
 [2003-08-08 15:58 UTC] sitnikov at infonet dot ee
Description:
------------
b.xml
------------------------------------
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="b.xsl"?>
<test>
</test>
------------------------------------

b.xsl
------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/test">
<html>
   <head>
   <title>TEST</title>
   </head>
   <body bgcolor="blue" text="#000000">
   <center>HELLO</center>
   </body>
</html>
</xsl:template>
</xsl:stylesheet>
------------------------------------

b.php
------------------------------------
<?
// Allocate a new XSLT processor
$xh = xslt_create() or die('Can not do; xslt_create()');

xslt_set_log($xh, true);
xslt_set_log($xh, '/tmp/sablot.log');

// Process the document
if ($result = xslt_process($xh, './data/b.xml', './data/b.xsl')) {
    print "SUCCESS, test.xml was transformed by test.xsl into result.xml";
    print ", result.xml has the following contents\n<br>\n";
    print "<pre>\n";
    echo $result;
    print "</pre>\n";
}
else {
    print "Sorry, test.xml could not be transformed by test.xsl into";
    print "  result.xml the reason is that " . xslt_error($xh) . " and the ";
    print "error code is " . xslt_errno($xh);
}

xslt_free($xh);
?>
--------------------------------------

Results:

sabcmd: SUCCESS
PHP 4.3.2:  SUCCESS
PHP 4.3.3RC3: ERROR (duplicate attribute and the error code is 2)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-08 18:43 UTC] sniper@php.net
I can not reproduce this with latest PHP CVS and Sabltron 1.0. The output is 'SUCCESS' always.

How did you configure Sablotron? And PHP?

 [2003-08-09 00:34 UTC] sitnikov at infonet dot ee
PHP:
./configure \
--enable-inline-optimization \
--prefix=/usr/local/apache-dev/php \
--with-apxs=/usr/local/apache-dev/bin/apxs \
--with-config-file-path=/usr/local/apache-dev/Zend/etc \
--enable-track-vars \
--enable-magic-quotes \
--enable-safe-mode \
--enable-memory-limit \
--enable-sysvshm \
--enable-sysvsem \
--enable-shmop \
--enable-sockets \
--enable-wddx \
--enable-xslt \
--enable-ctype \
--enable-bcmath \
--enable-mailparse \
--enable-ftp \
--enable-dba \
--enable-dbase \
--with-ndbm \
--with-gdbm \
--with-db2 \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-ttf \
--with-t1lib \
--with-mysql=/usr/local/mysql \
--with-epipe \
--with-mcrypt \
--with-mhash \
--with-zlib \
--with-mm \
--with-xmlrpc \
--with-iconv=/usr/local \
--with-iconv-dir=/usr/local \
--with-curl \
--with-bz2 \
--with-gmp  \
--with-ldap=/usr/local/openldap \
--with-xml  \
--with-zip  \
--with-gettext \
--with-dom \
--with-dom-xslt \
--with-xslt-sablot=/usr/local/Sablot-1.0 \
--with-sablot-js=/usr \
--with-imap=/home/work/install/imap-2002b \
--with-pgsql 

Sablot:
./configure --prefix=/usr/local/Sablot-1.0 --enable-javascript --with-js-prefix=/usr --with-iconv-prefix=/usr/local
 [2003-08-09 06:49 UTC] derick@php.net

 [2003-08-09 09:30 UTC] sniper@php.net
Try this patch, it cured the segfault for me:

  http://www.php.net/~jani/bug24989.txt

 [2003-08-09 09:53 UTC] sitnikov at infonet dot ee
This patch has solved my problem.
 [2003-08-09 10:41 UTC] sniper@php.net
Fixed in CVS now. Will be in final 4.3.3.

 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 08:02:33 2014 UTC