On Fri, Dec 9, 2011 at 5:36 AM, Marlen Caemmerer <caemmerer(a)monoro.de>wrote;wrote:
Hello,
I try to run maintenance/update.php.
It always fails with this error:
Your system has a combination of PHP and libxml2 versions which is buggy
and can cause hidden data corruption in MediaWiki and other web apps.
Upgrade to PHP 5.2.9 or later and libxml2 2.7.3 or later!
ABORTING (see
http://bugs.php.net/bug.php?id=45996).
But my versions are quite new:
A number of folks on that PHP bug report have indicating seeing this bug
even with newer versions of libxml2 etc; I don't know whether this is due
to some deeper bug, or weird configurations where it didn't actually fully
update or if some library version is embedded or what. :(
Just to make sure it's failing the way we expect, try this test script:
<?php
class PhpXmlBugTester {
private $parsedData = '';
public $ok = false;
public function __construct() {
$charData = '<b>c</b>';
$xml = '<a>' . htmlspecialchars( $charData ) .
'</a>';
$parser = xml_parser_create();
xml_set_character_data_handler( $parser, array( $this, 'chardata' )
);
$parsedOk = xml_parse( $parser, $xml, true );
$this->ok = $parsedOk && ( $this->parsedData == $charData );
print "<pre>\n";
print "Got: " . htmlspecialchars($this->parsedData) .
"\n";
print "Expected: " . htmlspecialchars($charData) . "\n";
print "</pre>\n";
}
public function chardata( $parser, $data ) {
$this->parsedData .= $data;
}
}
$a = new PhpXmlBugTester();
?>
It should show:
Got: <b>c</b>
Expected: <b>c</b>
if all is well.
If it shows "Got: bcb" then I believe that's an example of this particular
bug. If it says something else, that's interesting. :)
-- brion