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.

PHP 5.3 install problem with 5.2 verion

Discussion in 'General Discussion' started by hekri, Feb 3, 2011.

  1. hekri

    hekri Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    149
    Likes Received:
    2
    Trophy Points:
    18
    Hello

    I have installed php 5.2 fastcgi apache2 and now want to add to thise instalation php 5.3

    Code:
    cd php-5.3.5
    ./configure '--disable-posix' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-wddx' '--enable-zip' '--prefix=/usr/local/lib/php53' '--with-config-file-path=/usr/local/lib/php53/' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2/lib64' '--with-libxml-dir=/opt/xml2/lib64' '--with-mcrypt=/opt/libmcrypt/' '--with-mhash=/opt/mhash/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-sqlite=shared' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr'
    make
    make install
    

    At the end of make command i have errors:

    Code:
    /root/downloads/php-5.2.13/sapi/cli/php: /usr/lib64/libxml2.so.2: no version information available (required by /root/downloads/php-5.2.13/sapi/cli/php)
    /root/downloads/php-5.2.13/sapi/cli/php: /usr/lib64/libxml2.so.2: no version information available (required by /root/downloads/php-5.2.13/sapi/cli/php)
    the same comunicate for XSLt
    

    Maybe someone knows why?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Is there a reason you are manually compiling PHP rather than using EasyApache to perform this task? PHP 5.3.4 is available when running /scripts/easyapache or in WHM > EasyApache (Apache Update) area.
     
  3. hekri

    hekri Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    149
    Likes Received:
    2
    Trophy Points:
    18
    I need to run booth of them php 5.2 and php 5.3
     
  4. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    You can run 1 PHP 5.x version by default through EasyApache. Theoretically, one could compile an additional custom install of PHP version required via source but its not practical to do so.
     
  5. hekri

    hekri Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    149
    Likes Received:
    2
    Trophy Points:
    18
    I had problem with error with XML /usr/lib64/libxml2 when i run make. I dont know why. I need to give users booth versions (in fastcgi is wery simple client need add only one line to .htaccess) because users need to test scripts on php 5.3 does his script work propertly.
     
  6. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    Yes, extensive customizations under such constraints can cause issues. You could ask the users to test their scripts on local PHP 5.3 installs and once it works, upload the scripts to the server.
     
  7. kbob

    kbob Member

    Joined:
    May 30, 2011
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    :)


    This is happening due to the fact that you have two different versions of libxml2 what you need to do is locate all of the current version files with :

    locate libxml2.so.2

    the remove the current symlink from :

    /usr/lib64/libxml2.so.2

    and replace it with a link to the newest version of the library , example :

    ln -sf /opt/xml2/lib/libxml2.so.2.7.6 /usr/lib64/libxml2.so.2

    after that you should be able to use the build without any trouble.

    Also regarding the response from @ JawadArshad , i am guessing a client would not respond well to such a request , moreover when he is actually paying for a service which may provide him with such an extra.
     
    #7 kbob, May 31, 2011
    Last edited: May 31, 2011
  8. hekri

    hekri Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    149
    Likes Received:
    2
    Trophy Points:
    18
    BIG thanx :)

    Its not normal that no one form cPanel staff dont know how to do that!
     
  9. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    cPanel staff do not recommend running two versions of PHP 5, since that isn't something we currently support. It's a customized option :) If one doesn't work, we will be unable to troubleshoot any issues being caused by that customized PHP version, similar to those who run nginx with Apache or anything else we do not support directly.
     
  10. kbob

    kbob Member

    Joined:
    May 30, 2011
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    @hekri You are most welcome :)

    @cPanelTristan i doubt anyone would considering having two different version of PHP on their share hosting servers based on cPanel except from necessity caused by client needs or any other factor. Considering the fact that php 5.3 is more popular with each day programmers are trying to convert their apps to work on it or otherwise with both 5.2 and 5.3 i would say this makes it a necessary addition to the feature lists.

    Anyway you should not experience any issues, i have been running a server with a bit differently compiled php 5.3.x for about 4 months without any trouble at all. Prior to this setup i was running a few other servers with cPanel PHP latest compiled via EasyApache and two other versions of php 5.2.x due to other such necessities ;) without any trouble over one year.
     
  11. ispro

    ispro Well-Known Member

    Joined:
    Apr 8, 2004
    Messages:
    628
    Likes Received:
    1
    Trophy Points:
    18
    We run PHP 5.3.6 (latest stable 5.3 branch), PHP 5.2.17 and PHP 4.4.9 as we have customers which need the freedom of choice. It was not as hard as we run customized php installs (not via EasyApache). We recommend each serious server owners to compile their own PHP instead of using limited EasyApache interface.

    The main issue with PHP 5.3 is Zend. If you have 5.2 encoded files they are to be decoded by Zend Optimizer and 5.3 using Zend Guard instead. It may be catastrophic for those who got encoded files and cannot get updates. That's why we run both versions (and we also assist those who may modify scripts to be 5.3 compliant).
     
Loading...

Share This Page