Red Hat Bugzilla – Bug 467314
libxml2 causes breakage with character data in PHP xml_parse()
Last modified: 2009-06-11 05:35:21 EDT
Description of problem:
There is a bug that occurs when PHP is compiled against libxml2 : when parsing XML data with xml_parse, entities ( < > ... ) are silently skipped.
According to the Bug Report in PHP ( http://bugs.php.net/bug.php?id=45996 ) the only workaround so far is to compile PHP with expat (only for specific modules)
One poster was nice enough to point out the modification to Mandriva's RPM, I suppose it is not very different for Fedora's RPM : http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/updates/2009.0/php/c
Version-Release number of selected component (if applicable):
(See PHP Bug Report)
Looks like a simple bug. Switching XML library to work around this stuff is stupid. Have posted patch upstream for review:
(Note added per Joe's request)
The patch seems not to have the desired effect. (cf http://bugs.php.net/bug.php?id=45996 )
I'm affected by this problem, too. I use TYPO3 with F9 for TYPO3 development and some functions don't work because of this bug. The same TYPO3 Installation on CentOS 5 (PHP 5.2.6) with libxml2-2.6.26-22.214.171.124 works fine. On F9 i have libxml2-2.7.1-2.fc9.i386.
TYPO3 Bugtracker: http://bugs.typo3.org/view.php?id=9359
Is there a chance to get TYPO3 work on F9 again in a short time?
Thank you very much.
Sorry for posting again. I've seen there is a libxml2 Version 2.7.2. The Changelog looks like this bug is fixed!
I'll test this and try to rebuild the libxml2 rpm with the new version.
Installing libxml2-2.7.2 from updates-testing und rebuild/re-installing the latest fedora php 5.2.6-2 rpms doesn't help.
libXML support active
libXML Version 2.7.2
libXML streams enabled
I'm still open for ideas. ;-)
It looks like there's been progress upstream. According to the PHP bug report (http://bugs.php.net/bug.php?id=45996), it appears there is now a two-part fix available. One part is in PHP and the other in libxml2.
I think this is the patch for PHP?
And I think this is the patch for libxml2?
I hope this is helpful for getting a fix in for Fedora 9/10.
This problem seems to still occur in Fedora 10 with the latest updates.
+1 to getting a fix pushed out asap.
This definitely happens with php-5.2.6-5 and libxml2-2.7.3-1.fc10.
Downgrading to libxml2-2.6.32-1.fc9 "fixes" it.
Looks like it's fixed in PHP 5.2.9: http://uk3.php.net/ChangeLog-5.php
Any chance of an updated package getting released still in fc10?
I'll attach the patches I used to rebuild the RPMs on my own Fedora 10 system, which fixed the problem. What's the best way to prepare these for inclusion in Fedora?
Created attachment 339491 [details]
provides a new backwards-compatible parser option for php to use
Created attachment 339492 [details]
patch for php, makes it use the new parser option in libxml2
The PHP patch only works if the libxml2 patch of this ticket has already been installed.
Can you file a bug against libxml2 to request a backport/rebase to fix the libxml2 portion of this?
Sure, I created bug 495719 against libxml2.
libxml2-2.7.3 carrying the patch is in F10 stable updates since end of January
php-5.2.9-1.fc10,maniadrive-1.2-13.fc10 has been submitted as an update for
Please try new php 5.2.9
Updates work for me, thanks!
$ rpm -q php libxml2
Apparently, php 5.2.9 is now in stable.
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '9'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 9's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 9 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
A combination of php-5.2.9-2.fc10 and libxml2-2.7.3-1.fc10 (the latest from updates) fixes the problem for me AFAICT.
Thanks for the feedback. Making closed.