The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

libxml2 2.7.2 bug - how to go back to earlier version?

Discussion in 'General Discussion' started by TheKog, Oct 14, 2008.

  1. TheKog

    TheKog Active Member

    Joined:
    Dec 23, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    There is a bothersome bug that messes up the xml parser for php apps in libxml 2.7.2 - we have a new centos 5 box with php 5.2.6 and apache 2 over at serverbeach and came across this problem. Unfortunately version 2.7.2 of libxml2 is part of the STABLE branch.

    bug reported at http://bugs.php.net/bug.php?id=45996&thanks=3

    How can we rebuild to go back to a previous version that does not have this bug? We have the tarball for 2.6.22 but are afraid running the build and configure will break something else.

    We also have the rpm for the older version and noticed older versions are on the system already (2.6.26) and apprear to be built but not sure how to get them running in place of the more recent stuff.

    Can someone shed some light?
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    First, EasyApache is not tied to the cPanel branches. Servers running EDGE get the same EasyApache as servers running STABLE.

    Second, the recommended work around in that bug is to use libexpat for legacy applications. I'll bring this to the attention of the EasyApache developers to see what can be done.
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    deleted redundant post
     
    #3 cPanelKenneth, Oct 15, 2008
    Last edited: Oct 15, 2008
  4. TheKog

    TheKog Active Member

    Joined:
    Dec 23, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Uh, so how do I use that library or rebuild libxm2 with an older version? It's a server with tons of virtual servers, many of which have rss scripts that fail - does libexpat replace libxml2 transparently to apps that use the php xml_parser API?

    How about a direct answer to the questions I asked? I didn't gripe about cpanel or EA - I just asked how to go about remedying the situation until they get a fix out and gave you guys a heads up.

    I'd appreciate some assistance on how to make things work properly in the interim...
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Our technical analysts can assist you regarding your specific question. I recommend submitting a support ticket so they can analyze the situation and assist with the implementation of an interim solution.
     
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Since I didn't know which course of action would be proper for the circumstances, I needed to discuss this with one of our EasyApache developers before providing an answer. If you prefer someone provides an answer without validating it, that can be arranged.

    Per that discussion with the EasyApache developer, you should be able to safely move aside the /opt/xml2 install, preferably by renaming it. Once that is done you can install the version of libxml2 you desire. Please use the following flags when executing configure:

    Code:
    --prefix=/opt/xml2 --with-python=no
    
    Please be aware that if you run either EasyApache or /scripts/makecpphp after doing that, your version of libxml2 will be replaced.
     
  7. TheKog

    TheKog Active Member

    Joined:
    Dec 23, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Thanks but I got some good help from your support group. The real fix at the moment is to rebuild php with libexpat and to let libexpat handle the xml parser API for php applications rather than to go back to an early level of libxml2. Ultimately perhaps a future release of libxml2 will be fixed.

    In the interim this is what worked:

    Create the all_php5 file in /var/cpanel/easy/apache/rawopts/all_php5 and insert the following:

    --with-expat=builtin
    --with-libexpat-dir=/usr/lib (or wherever your libexpat lib is)

    easyapache will automatically compile any custom flags in rawopts/all_php5 when apache/php are rebuilt.
     
  8. oldblues11

    oldblues11 Registered

    Joined:
    Oct 17, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    #8 oldblues11, Oct 17, 2008
    Last edited: Oct 17, 2008
  9. TheKog

    TheKog Active Member

    Joined:
    Dec 23, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    I would not downgrade libxml. The addition of libexpat for compatibility works fine. And the method I used above for making it work with easy apache worked perfectly. No destabilizing, no worries. If you don't have anything broken because of it I wouldn't worry about it. We had specific scripts that were broken.
     
  10. oldblues11

    oldblues11 Registered

    Joined:
    Oct 17, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    tried to downgrade libxml2

    tried to downgrade libxml2 but it downgraded to 2.6.16 for some odd reason. anyways, the problem is fixed with the NuSoap library. I am going to try instead to compile with libexpat.
     
  11. oldblues11

    oldblues11 Registered

    Joined:
    Oct 17, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Tried the libexpat approach and it work

    Did the libexpat approach with all_php5

    works fine now.
     
  12. Silver_2000

    Silver_2000 Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    338
    Likes Received:
    1
    Trophy Points:
    18
    it would be nice to get this fixed
     
  13. wizzy420

    wizzy420 Well-Known Member

    Joined:
    Nov 13, 2007
    Messages:
    125
    Likes Received:
    2
    Trophy Points:
    18
    Is this fixed yet? Users all over the internet are complaining about this ...
     
  14. sundog_ak

    sundog_ak Registered

    Joined:
    Jan 10, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    See comment here. Basically, you will have to have the new version of LibXML2 (2.7.3) and the patched PHP files in CVS. Otherwise, will have to wait for PHP 5.2.9 release expected in late February.

    http://bugs.php.net/bug.php?id=45996

    I have tried LibXML2 2.7.3 and PHP 5.2.8, and that does not work (which was expected based on comment in bug close out). Have not tried patched CVS files since I am on shared server.
     
  15. wizzy420

    wizzy420 Well-Known Member

    Joined:
    Nov 13, 2007
    Messages:
    125
    Likes Received:
    2
    Trophy Points:
    18
    Hust tried 5.2.8 + 2.7.3 and WordPress people still have problems.

    Would be nice if cPanel could backport this one patch into EasyApache.

    This is something that affects all people using cPanel + Wordpress, two of the most popular things on the Internet.

    W
     
  16. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    Has anyone tried the PHP5 'XmlRPC' option by chance?

    It brings in --with-libexpat-dir=... which, as far as I can tell should be all that is needed since '--with-expat' and '--with-expat=builtin' are not documented in PHP's ./configure --help (which could mean nothing since PHP notorious for making sure --help does *not* match reality)
     
  17. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    That is because it is a PHP bug not a libxml2 bug like the PHP people will have you believe :)
     
  18. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    testing new expat opt mod now, will publish and notify list when it's available
     
  19. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    I've only became aware of this problem recently so apologize for any seeming delay. Here is a little bit of technical background to help appreciate why care must be taken when pushing out a fix for this:

    Here are PHP's configure options that relate to expat:

    Code:
     
      --enable-wddx           Enable WDDX support
      --with-libxml-dir=DIR     WDDX: libxml2 install prefix
      --with-lib[B]expat[/B]-dir=DIR   WDDX: libexpat dir for XMLRPC-EPI (deprecated)
    
    This inherits what anything else sets for libxml2 or expat.
    http://httpupdate.cpanel.net/cpanelsync/easy/Cpanel/Easy/PHP5/Wddx.pm

    Code:
      --disable-xml           Disable XML support
      --with-libxml-dir=DIR     XML: libxml2 install prefix
      --with-lib[B]expat[/B]-dir=DIR   XML: libexpat install prefix (deprecated)
    
    --with-libxml-dir is set by default in our PHP builds unless it could not be found/built

    Code:
      --with-xmlrpc[=DIR]     Include XMLRPC-EPI support
      --with-libxml-dir=DIR     XMLRPC-EPI: libxml2 install prefix
      --with-lib[B]expat[/B]-dir=DIR   XMLRPC-EPI: libexpat dir for XMLRPC-EPI (deprecated)
    
    This explicity does expat and inherits libxml2
    http://httpupdate.cpanel.net/cpanelsync/easy/Cpanel/Easy/PHP5/XmlRPC.pm

    I'm thinking their are 2 routes for this we can take besides 'Just use XmlRPC to bring in expat'

    1. We add an explicit expat option
    2. We patch all four PHP 5's

    The former will be done in a few minutes.

    The latter currently I'm inclined to not do since it will require ferdiddling the already fragile hairball of code that is PHP (assuming one could find the actual PHP patch from the ambiguous "This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours" at http://bugs.php.net/bug.php?id=45996), it will require lots of testing and QA, it's already supposed to be fixed in the upcoming PHP 5, it can be fixed by checking a box (the explicit expat option I'll start on as soon as I am done with this post)
     
  20. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    thats funny, the last 2 posts were out of order for me...

    Any way, checking 'expat' (without xmlrpc) I di indeed get the proper:

    --with-libexpat-dir=/usr

    It is now available in EasyApache rev 4599 which you should get automatically when first going into EasyApache.

    I am interested in hearing how this works out for you, please let me know!
     
Loading...

Share This Page