Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Thread: how to downgrade libxml2

  1. #1
    Join Date
    Nov 2006
    Posts
    203

    how to downgrade libxml2

    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 by roly; 10-27-2008 at 06:24 AM.

  2. #2
    Join Date
    Sep 2007
    Posts
    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.

  3. #3
    Join Date
    Nov 2006
    Posts
    203
    Quote Originally Posted by Dravu View Post
    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

  4. #4
    Join Date
    Nov 2006
    Posts
    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?

  5. #5
    Join Date
    Sep 2007
    Posts
    324
    Quote Originally Posted by roly View Post
    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?

  6. #6
    Join Date
    Nov 2006
    Posts
    203
    Quote Originally Posted by Dravu View Post
    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

  7. #7
    Join Date
    Mar 2005
    Posts
    5,280
    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
    Floyd Morrissette Little Creek Hosting
    Web Hosting Solutions. Virtual Private Servers
    DirectAdmin Administration and Support
    Our focus is on quality customer support

  8. #8
    Join Date
    Nov 2006
    Posts
    203
    Quote Originally Posted by floyd View Post
    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.

  9. #9
    Join Date
    Nov 2008
    Posts
    1
    Roly, have you figured out how to fix this? I'm having the same issue..

  10. #10
    Join Date
    Nov 2006
    Posts
    203
    Quote Originally Posted by nickutis View Post
    Roly, have you figured out how to fix this? I'm having the same issue..
    i've not had chance to try what floyd suggested yet but when i do i'll report back with my results.

  11. #11
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    8,004
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  12. #12
    Join Date
    Nov 2006
    Posts
    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.

    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?

  13. #13
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    8,004
    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...lwformed.patch
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  14. #14
    Join Date
    Nov 2006
    Posts
    203
    Quote Originally Posted by smtalk View Post
    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...lwformed.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 by roly; 11-11-2008 at 04:05 AM.

  15. #15
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    8,004
    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
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  16. #16
    Join Date
    Nov 2006
    Posts
    203
    Quote Originally Posted by smtalk View Post
    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

  17. #17
    Join Date
    Nov 2006
    Posts
    203
    Quote Originally Posted by smtalk View Post
    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 by roly; 11-11-2008 at 08:28 AM.

  18. #18
    Join Date
    Sep 2008
    Posts
    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 by Dark; 11-19-2008 at 12:51 AM.

  19. #19
    Join Date
    Sep 2008
    Posts
    35
    reinstalled php;
    Followed this thread http://www.directadmin.com/forum/sho...d.php?p=143719 ;
    And I still got error:
    Code:
    Warning: DOMDocument::loadXML(): Unsupported encoding windows-1251 in Entity, line: 1 in /root/test.php on line 2
    FreeBSD 6.3 installed on my server.
    I found in the internet that it ts FreeBSD's bug.

  20. #20
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    8,004
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

Page 1 of 2 12 LastLast

Similar Threads

  1. Manual changes need with new version of LibXML2
    By DirectAdmin Support in forum CustomBuild
    Replies: 42
    Last Post: 10-27-2016, 06:33 AM
  2. LibXML2 2.9.0 Released
    By DirectAdmin Support in forum Required Software Version Updates
    Replies: 8
    Last Post: 09-27-2012, 11:13 AM
  3. PHP5.1 needs libxml2 ... it won't install
    By modem in forum General Technical Discussion & Troubleshooting
    Replies: 8
    Last Post: 10-09-2008, 06:25 AM
  4. Problem with installation of libxml2
    By Slash in forum FreeBSD 6.x
    Replies: 3
    Last Post: 05-30-2008, 06:30 AM
  5. Installing libxml2
    By datacreek in forum Installation / System Requirements
    Replies: 1
    Last Post: 08-23-2006, 03:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •