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 Upgrading

Discussion in 'General Discussion' started by VISL, Aug 8, 2007.

  1. VISL

    VISL Member

    Joined:
    Jul 14, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    My WHM/Cpanel is currently running PHP 4.4.7, I want to upgrade it to PHP 5.2.1 or similar but am concerned I could mess everything up.

    Is it easy to do via the WHM Panel? I'm concerned I may break the server completely.

    Thanks
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Go through this carefully :-
    Login to server as root.
    Execute the script :-
    /scripts/easyapache >>> after few minutes it will display 8 options.
    Select 7th
    Select 'PHP Module ---->' and hit enter.
    Select PHP version using space bar.
    Select 'Exit', again select 'Exit' and then say 'Yes' to save.
    Let the script execute completely.

    After completion, restart apache:
    service httpd stop
    service httpd start

    OR

    You can also install it from WHM if you wish to.
    Goto Software >> Apache update >> click on "Load Previous Config"
    Select the PHP version you wish to.
    Click Save.


    Execute php -v to check the version.
     
  3. 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
    I usually use WHM and have recompiled/upgraded PHP a few times myself. It's easy, just read carefully as there are some things that can adversely interact with PHP (such as mod_perl).

    In EA3 we are separating the items that are experimental and more clearly indicating the modules that may cause issues so you wont need to worry as much. EA3 will be available in cPanel 11 Stage 2.
     
  4. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    and php -m to be sure your modules were compiled.
     
  5. VISL

    VISL Member

    Joined:
    Jul 14, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Just tried an upgrade from WHM.

    Httpd failed :( Reverting back to 4.47 to see if I can at least get web pages working again.
     
  6. activa

    activa Well-Known Member

    Joined:
    May 23, 2006
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Morocco
    cPanel Access Level:
    Root Administrator
    the same isseu
    ....


    any other suggestion ?
     
  7. VISL

    VISL Member

    Joined:
    Jul 14, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Glad to know I'm not the only one!

    I was thinking .... 'I can't even click a few buttons!!'
     
  8. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    If the compile completed without errors, then apache needs some small adjustments to start. This could be something as simple as extensions listed in php.ini needing updates or even httpd.conf commenting out php5 instead of 4, etc.


    I would suggest hiring someone to upgrade for you if you do not know what to look for or ask your data center if you are on a managed box. Feel free to PM me if you need assistance.
     
  9. dataferret

    dataferret Member

    Joined:
    Jul 20, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Worth checking when upgrading from PHP4 to PHP5 - look at which version of Ioncube is installed and upgrade/downgrade Ioncube to the most suitable version for your PHP install
     
Loading...

Share This Page