Search: Advanced search
Browse by category:
Fixing libxml, php bug and issues with HTML entities by downgrading libxml
When you parse XML with PHP and libxml 2.7.0, all HTML entities gets stripped out. This is a known bug with libxml 2.7.0 and this bug mess up a lot of things.
The solution for this is to downgrade libxml to an older version. The steps are given below:1. First you will have to install an older version of libxml, I installed libxml 2.6.30.
tar xvzf libxml2-2.6.30.tar.gz
./configure –bindir=/opt/libxml/ –sbindir=/opt/libxml/ –libexecdir=/opt/libxml/ –datadir=/opt/libxml/ –sysconfdir=/opt/libxml/ --sharedstatedir=/opt/libxml/ –libdir=/opt/libxml/ –includedir=/opt/libxml/ –oldincludedir=/opt/libxml/
make && make install
2. Next step is to update yum.conf to prevent it from updating libxml back, so edit: /etc/yum.conf
And find the line that starts with: exclude=
And add libxml* to the end of it so this line should look something like this:
exclude=apache* bind-chroot courier* dovecot* exim* httpd* mod_ssl* mysql* nsd* php* proftpd* pure-ftpd* spamassassin* squirrelmail* libxml*
3. Now you will have to let WHM know that we want to compile PHP with this new libxml. We can do it by the following commands:
There will be a file namely "all_php5". If it is there edit it, otherwise create the file. Add the following lines to the end of it:
Now go ahead and build Apache and PHP using:
WHM >> Main >> Software >> EasyApache (Apache Update)
or you can do it from backend by the script
You should be all set.
4. To check the current version of libxml:
php -i | grep libxml