how to downgrade libxml2

roly

Verified User
Joined
Nov 9, 2006
Messages
203
hi

there is a bug in the 2.7.2 version of libxml2 that i'm using that removes angle brackets from html in uploaded wordpress posts. to get round this i need to downgrade libxml2.

so basically i need to downgrade libxml2 to version 2.6.32 (libxml2-2.6.32) which apparently doesn't have this bug. has anyone got any idea how i can do this without breaking something? i've tried "yum remove libxml2" but there are lots of dependencies including bind. i also see that libxml2 is within custombuild, which is why i'm asking here.

any advice greatly appreciated

thanks in advance

roland
 
Last edited:

Dravu

Verified User
Joined
Sep 9, 2007
Messages
324
I'd probably do the following:
cd /usr/local/directadmin/custombuild/
wget http://xmlsoft.org/sources/libxml2-2.6.32.tar.gz
That will download the version you want. Next, edit the versions.txt file:
nano -w versions.txt
Find the line that says "libxml2:2.7.2:dc43ff7ae6aded45f578c87b7b0c8766" and replace it with:
libxml2:2.6.32:2621d322c16f0257e30f0ff2b13384de
Do Ctrl + X and hit Y to save the file. Next, edit the options.conf file:
nano -w options.conf
Find the line that says "autover=yes" and change it to "autover=no". Save that file and then just do:
./build libxml2
and it'll build the downgraded version. Really wish there was an easier method of doing it, but that's that's the only way I know of right now. Also, unless you go back and change the last part back to "autover=yes", you'll have to do "./build update" to get the updated versions file and see what new versions of software is available.
 

roly

Verified User
Joined
Nov 9, 2006
Messages
203
I'd probably do the following:

That will download the version you want. Next, edit the versions.txt file:

Find the line that says "libxml2:2.7.2:dc43ff7ae6aded45f578c87b7b0c8766" and replace it with:

Do Ctrl + X and hit Y to save the file. Next, edit the options.conf file:

Find the line that says "autover=yes" and change it to "autover=no". Save that file and then just do:
and it'll build the downgraded version. Really wish there was an easier method of doing it, but that's that's the only way I know of right now. Also, unless you go back and change the last part back to "autover=yes", you'll have to do "./build update" to get the updated versions file and see what new versions of software is available.

thanks dravu, you're a star :) that's sorted it out. hopefully they will fix this bug in the next update. thanks again.

roland
 

roly

Verified User
Joined
Nov 9, 2006
Messages
203
i was a bit premature there, it hasn't sorted it out. but i know that the bug in libxml2-2.7.2 is the problem, but downgrading it doesn't seem to have helped. i also tried downgrading the libxml2, libxml2-devel and libxml2-python that yum updates (is this the same libxml2 that custombuild installs) but even that hasn't sorted it out. i even tried a "./build all d" incase php or apache was linked to 2.7.2 version. has anyone else got any suggestions?
 

Dravu

Verified User
Joined
Sep 9, 2007
Messages
324
i was a bit premature there, it hasn't sorted it out. but i know that the bug in libxml2-2.7.2 is the problem, but downgrading it doesn't seem to have helped. i also tried downgrading the libxml2, libxml2-devel and libxml2-python that yum updates (is this the same libxml2 that custombuild installs) but even that hasn't sorted it out. i even tried a "./build all d" incase php or apache was linked to 2.7.2 version. has anyone else got any suggestions?
Well Yum builds from packages, while Custombuild builds from the actual source files. That's why Yum will show different versions than what you have. So are you just still having the same problems that you were with 2.7.2?
 

roly

Verified User
Joined
Nov 9, 2006
Messages
203
Well Yum builds from packages, while Custombuild builds from the actual source files. That's why Yum will show different versions than what you have. So are you just still having the same problems that you were with 2.7.2?
hi, yes i still seem to have the same problem as 2.7.2
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,285
It sounds like you have both installed, one from yum and the other from custombuild.

Code:
rpm -q libxml2
If that shows 2.7.2 then you definitely have the 2.7.2 installed via yum or other rpm.

This is what I use when I want to replace a package.
Code:
yum install yum-utils #if it is not already installed
yumdownloader yumdownloader libxml2-2.6.26 #or whatever version matches your system
rpm -i --replacefiles --replacepkgs --upgrade libxml2-2.6.26-2.1.2.6.i386.rpm
 

roly

Verified User
Joined
Nov 9, 2006
Messages
203
It sounds like you have both installed, one from yum and the other from custombuild.

Code:
rpm -q libxml2
If that shows 2.7.2 then you definitely have the 2.7.2 installed via yum or other rpm.

This is what I use when I want to replace a package.
Code:
yum install yum-utils #if it is not already installed
yumdownloader yumdownloader libxml2-2.6.26 #or whatever version matches your system
rpm -i --replacefiles --replacepkgs --upgrade libxml2-2.6.26-2.1.2.6.i386.rpm
thanks floyd, i'll check it out and report back with my results.
 

roly

Verified User
Joined
Nov 9, 2006
Messages
203
i've still not solved this. it still seems to be using the buggy version. this is what i have done so far, can anyone offer a suggestion?

i removed the yum installed libxml2, libxml2-devel etc with "rpm -e --nodeps", i added libxml2* to my exclude list in yum.conf.

i then used dravu's suggestion of downloading an earlier version of libxml2 and changing custombuilds version.txt and rebuilding libxml2 with custombuild, i've also tried a "./build all" with the modified versions.txt, and yet i am still getting the same problem.

has anyone encountered this and managed to solve it? it's driving me nuts.:eek:

or any further suggestions appreciated.

i notice in the link that smtalk has posted, they suggest am alternative work around of building php with "build ext/xml with expat". is this something i can do with custombuild?
 

roly

Verified User
Joined
Nov 9, 2006
Messages
203
Yes, you can build PHP with libexpat (add --with-libexpat-dir=/usr (make sure you have expat-devel installed on your system), or just patch PHP to fix the problem: http://people.apache.org/~jorton/php-5.2.6-xmlwformed.patch
hi Martynas

thanks for the reply. excuse my ignorance but how to i go about applying that patch you mentioned?

and as far as building php with libexpat, i assume with custombuild i just edit (in my case apache2/php5) the /usr/local/directadmin/custombuild/configure/ap2/configure.php5 file, and then rebuild?
 
Last edited:

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,329
Location
LT, EU
Code:
cd /usr/local/directadmin/custombuild
./build clean
./build update
tar xzf php-5.2.6.tar.gz
wget http://people.apache.org/~jorton/php-5.2.6-xmlwformed.patch
patch -p0 < php-5.2.6-xmlwformed.patch
cd php-5.2.6
../configure/ap2/configure.php5
make
make install
That's it, restart apache now :)
 

roly

Verified User
Joined
Nov 9, 2006
Messages
203
Code:
cd /usr/local/directadmin/custombuild
./build clean
./build update
tar xzf php-5.2.6.tar.gz
wget http://people.apache.org/~jorton/php-5.2.6-xmlwformed.patch
patch -p0 < php-5.2.6-xmlwformed.patch
cd php-5.2.6
../configure/ap2/configure.php5
make
make install
That's it, restart apache now :)
thanks! i'll give a try and report back :)
 

roly

Verified User
Joined
Nov 9, 2006
Messages
203
Code:
cd /usr/local/directadmin/custombuild
./build clean
./build update
tar xzf php-5.2.6.tar.gz
wget http://people.apache.org/~jorton/php-5.2.6-xmlwformed.patch
patch -p0 < php-5.2.6-xmlwformed.patch
cd php-5.2.6
../configure/ap2/configure.php5
make
make install
That's it, restart apache now :)
thank you, works perfectly now :). and thanks to the others who offered some input on this problem, it's appreciated.
 
Last edited:

Dark

Verified User
Joined
Sep 15, 2008
Messages
35
I've got that error:
Code:
checking for MySQL UNIX socket location... /tmp/mysql.sock
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
../configure/ap2/configure.php5: --with-mysqli=/usr/local/mysql/bin/mysql_config: not found
or that (if --with-mysqli without path)
Code:
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
--with-mysqli: not found
I tryed --with-mysql=/usr/local/mysql or --with-mysql=/usr/
But nothing. I get the same error.

After installing mysqlclient:

Code:
+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

--with-mysqli: not found
 
Last edited:
Top