Conclusion of libxml2 Issues – Use PHP 5.2.9 & libxml2 2.7.3
17 Mar 2009 @ 3:05pm : WordPress & libxml2 Episode IV: A New Plugin
With the release of PHP 5.2.9 all of the pieces are available to solve the XML bracket stripping puzzle. To make it perfectly clear, you need to have BOTH libxml2 version 2.7.3 and PHP version 5.2.9 in order to make this work. Mixing either one with older versions will not work. When testing this also confirm that your build of PHP 5.2.9 is using the correct version of libxml2 and not some older version (you can easily check this using phpinfo( ) ).
I went back to my test setup and built PHP 5.2.9 with libxml2 2.7.3 and added new posts to a WordPress blog via XML-RPC with lots of tags in the post body. They all came through intact. Not a single bracket missing.
If you are on a host that is using known broken version combinations of PHP & libxml2 now you can tell them exactly which versions do work. Feel free to point them this and previous posts (Problems With libxml2 For WordPress XML-RPC Users and Update On libxml2 Issues) if they want some history and context of the problem.
Related posts:
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

[...] with 35 comments 3 Feb 2009 @ 2:00pm : Update on libxml2 issues 4 Mar 2009 @ 2:38pm : Conclusion of libxml2 Issues – Use PHP 5.2.9 & libxml2 2.7.3 [...]
[...] with 7 comments 4 Mar 2009 @ 2:38pm : Conclusion of libxml2 Issues – Use PHP 5.2.9 & libxml2 2.7.3 [...]
[...] PHP version 5.2.9 and libxml2 version 2.7.3 which was summarized in Joseph Scott weblog entry – Conclusion of libxml2 issues. More details can also be found in the changelog of PHP version 5.2.9 from PHP official [...]
[...] For those of you who use Microsoft’s Windows Live Writer to create your WP blog posts, if you find that your posts are showing up unformatted and with the < and > symbols stripped out, you can find the reason and the fix here. [...]
I have now have PHP 5.2.9 with libxml2 2.7.3 and I am still having the same problem :(
Have you confirmed that your build of PHP 5.2.9 is using libxml2 2.7.3 and not some other version of libxml2?
I uploaded a phpinfo file to my server which shows libxml2 2.7.3
Is there some other way I should verify that it is using 2.7.3?
Sounds like it’s using libxml2 2.7.3 then. Odd. Did you restart the web server after your PHP/libxml2 upgrade?
Yes I did :( Maybe there is just some other problem somewhere that I am not aware of.
Hmm, those are the obvious things that might have gone wrong.
You can try the work around plugin – http://josephscott.org/archives/2009/03/wordpress-libxml2-episode-iv-a-new-plugin/ – but you’ll probably need to tweak it to recognize libxml2 2.7.3.
If you are using PHP 5.2.9 built with libxml2 2.7.3 then it should be working. If you phpinfo page is still up drop me a note – http://josephscott.org/contact/ – and I’ll take a look, see if anything jumps out at me.
was this problem ever resolved?
just hoping that when i upgrade my php from 5.2.8 to 5.2.9 and my libxml from 2.7.2 to 2.73 that my imported posts from RSS feeds will work again and not stop removing the “”. :-)
rather, stop removing the html bracket tags :-)
Yes, using PHP 5.2.9 that is build with libxml2 2.7.3 fixes the problem.
Is there any way for a ‘normal’ user to upgrade the version of libXML that comes with XAMPP 1.0.1, as unfortunately, they’ve included libXML 2.7.2 and I’m having this problem. I’m running OS X 10.4.11 and don’t seem to be able to compile anything on it — but I really don’t know much about this. I don’t suppose Apache Friends is going to do this any time soon? Right now neither MAMP, which recently stopped working all together, and XAMPP, are functioning properly and I do a lot of blog development.
I’m not familiar enough with XAMPP to know how hard it would be to build it with a new version of libxml2. You may just have to use the plugin work and bug the XAMPP devs to use versions of PHP5 and libxml2 that aren’t broken.
[...] Conclusion of libxml2 Issues – Use PHP 5.2.9 & libxml2 2.7.3 || Joseph Scott [...]
[...] http://josephscott.org/archives/2009/03/conclusion-of-libxml2-issues-use-php-529-libxml2-273/ [...]
Thanks for the blog – saved me some troubleshooting and diagnostics time.
I experienced the problem with libxml2 Version 2.6.27 and PHP Version 5.2.9, and my host refused to do anything. I used the plug-in but I had to edit the if statement to work with my older version of libxml2. Once I did that, problem was solved.
[...] libxml2 and can only be corrected by the server admin. Here is a link to how to solve this problem Click Here I got to thank my webhosting Space2u for fixing this for me. If you live in Sweden and are in need [...]