From: sitnikov at infonet dot ee
Operating system: Linux
PHP version: 4.3.2
PHP Bug Type: XSLT related
Bug description: xslt transform stop working after upgrade from 4.2.3 into 4.3.2
After upgrade PHP from 4.2.3 into 4.3.2 xslt transformation stop working.
1.php (not working)
<?
// Allocate a new XSLT processor
$xh = xslt_create() or die('Can not do; xslt_create()');
$arguments = array(
'/_xml' => file_get_contents('xml/1.xml'),
'/_xsl' => file_get_contents('xsl/1.xsl'),
);
// Process the document
if ( $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL,
$arguments) ) {
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);
?>
2.php - working
<?
// Allocate a new XSLT processor
$xh = xslt_create() or die('Can not do; xslt_create()');
$arguments = array(
'/_xml' => file_get_contents('xml/1.xml'),
);
// Process the document
if ( $result = xslt_process($xh, 'arg:/_xml', 'xsl/1.xsl', NULL,
$arguments) ) {
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);
?>
Test full suite: http://si.infonet.ee/sablot.rar
xml & xsl you can see in rar file.
after some research i found what problem in
http://cvs.php.net/diff.php/php4/ext/xslt/sablot.c?login=2&r1=1.63&r2=1.64&ty=u
patch.
after removing this patch my code again work.
--
Edit bug report at http://bugs.php.net/?id=23889&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23889&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23889&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23889&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23889&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23889&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23889&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23889&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23889&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23889&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23889&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23889&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23889&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23889&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23889&r=gnused