Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
October 23, 2014, 11:53:48 PM

Pages: [1]   Go Down
  Print  
Author Topic: Upgrading Apache and PHP on a cPanel server  (Read 33965 times)
Danielle
Guest
« on: September 12, 2006, 06:59:44 AM »

Hi,

On cPanel servers, upgrading Apache and PHP is relatively easy.  You can choose to do it either in WHM (Webhosting Manager) or in shell.

-------------------------------------
WHM Apache & PHP upgrade

1. Log into WHM using https://domain.com:2087/
2. Go to <b>Apache Update</b> link under <i>Software</i> category on the left hand side pane
3. Click the "Load Previous Config" button in the center top area, then uncheck the prior PHP version that's checked and check the new PHP version (such as 4.4.4 or 5.1.6, depending on whether you are using PHP4 or PHP5 on your machine(s))
4. Click the "Start Build" button
5. Wait for the upgrade to process (usually this takes around 10-20 minutes)

-------------------------------------
Shell Apache & PHP upgrade (only do if you aren't using the WHM Apache & PHP upgrade, you would not do both the WHM one and this one as both do the same basic upgrade)

1. SSH into your shell
2. Run the following command:

Code:
/scripts/easyapache

3. Wait for the following screen to appear:

Code:
Select skill level:
   If it is possible for you to run phpsuexec, we recommend you do this
   by choosing option 2, or using the advanced options.

   phpsuexec combinded with webroot protection will prevent people
   from reading other users webroots.   If you are unable to use
   phpsuexec we recommend you enable PHP open_basedir security
   inside of Web Host Manager.

   The following does not work with phpsuexec:  php commands in
   .htaccess, php http authentication.

1) Beginner without/phpsuexec + webroot protection support (*** DEFAULT ***)
2) Beginner with/phpsuexec support + web root protection
3) Beginner with/php mcrypt support (if php will not compile, you must choose option 1)
4) Beginner with/php gd+freetype support (if php will not compile, you must choose opti
on 1)
5) Beginner with/php gd+freetype+mcrypt support (if php will not compile, you must choo
se option 1)
6) Advanced (Experts Only, At Your Own Risk)
7) Advanced [Load Previous Config] (Experts Only, At Your Own Risk)
8) Failsafe mode (Resets apache config to default, USE ONLY AS A LAST RESORT)
---->

Enter 7 at the arrow prompt (---->) as this loads the previous configuration.

4. Wait until you see the following screen:

Code:
             μρρρρρρρρρρρρρρρρρρρρρρρ Main Menu ρρρρρρρρρρρρρρρρρρρρρρρρλ
             ψ μρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρλ ψ
             ψ ψ[*] Expires Module                                    ψ ψ
             ψ ψ[*] Raise FD_SETSIZE to 16384 (System Wide)           ψ ψ
             ψ ψ[*] Prevent Users from reading other webroots         ψ ψ
             ψ ψ[*] Frontpage Module                                  ψ ψ
             ψ ψ[ ] Gzip Module (experimental)                        ψ ψ
             ψ ψ[*] Raise HARD_SERVER_LIMIT                           ψ ψ
             ψ ψ[ ] Perl Module (not required to run .cgi scripts/not ψ ψ
             ψ ψPhp Module --->                                       ψ ψ
             ψ ψ[ ] PHP suEXEC Support                                ψ ψ
             ψ ψ[*] Report Build Errors to cPanel                     ψ ψ
             ψ ψ[ ] Reset Apache Config to Default (last resort)      ψ ψ
             ψ ψ[*] Rewrite Module                                    ψ ψ
             ψ ψ[ ] Skip Apache Build if up to date                   ψ ψ
             ψ ψ[*] SSL Module                                        ψ ψ
             ψ νφ(+)ρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρκ ψ
             τρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρυ
             ψ             <Select>    < Exit >    < Help >             ψ
             νρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρκ

Tab down to Php Module ---> and hit Enter key

5. You should then see the following:

Code:
             μρρρρρρρρρρρρρρρρρρρρ Php Module Menu ρρρρρρρρρρρρρρρρρρρρρλ
             ψ μρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρλ ψ
             ψ ψ[*] Php Module                                        ψ ψ
             ψ ψ     ( ) Version 4.3.11                               ψ ψ
             ψ ψ     (*) Version 4.4.1                                ψ ψ
             ψ ψ     ( ) Version 4.4.2                                ψ ψ
             ψ ψ     () Version 4.4.3                                 ψ ψ
             ψ ψ     () Version 4.4.4                                 ψ ψ
             ψ ψ     ( ) Version 5.0.4                                ψ ψ
             ψ ψ     ( ) Version 5.0.5                                ψ ψ
             ψ ψ     ( ) Version 5.1.2                                ψ ψ
             ψ ψ     () Version 5.1.4                                ψ ψ
             ψ ψ     () Version 5.1.6                                 ψ ψ
             ψ ψ     (*) Bc Math                                      ψ ψ
             ψ ψ     (*) Calendar Support                             ψ ψ
             ψ ψ     (*) Curl                                         ψ ψ
             ψ νφ(+)ρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρκ ψ
             τρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρυ
             ψ             <Select>    < Exit >    < Help >             ψ
             νρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρκ

Tab down to whatever prior PHP version is * and hit the Enter key to unstar it, then tab down to the new PHP version (4.4.4 or 5.1.6) and hit Enter to star it (*). 

6. Hit the arrow key (->) to arrow over to Exit, then hit the Enter key.  This takes you back to the prior menu.

7. Hit the arrow key (->) to arrow over to Exit, then hit the Enter key.

8. You should see the following prompt:

Code:
             μρρρρρρρρρρρρρρρρρρρ Save Configuration ρρρρρρρρρρρρρρρρρρρλ
             ψ     Do you want to save this apache configuation?        ψ
             τρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρυ
             ψ                   < Yes >      <  No  >                  ψ
             νρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρρκ

Yes would already be highlighted, so hit the Enter key.

9. The upgrade will begin processing.  It should take around 10-20 minutes to complete

-------------------------------------

Please note that if Apache fails to start at the end of either the WHM or the shell Apache & PHP upgrade, you can do one of the following to get Apache working:

1. In WHM, click on <b>HTTP Server (Apache)</b> link under the <i>Restart Services</i> menu.
or
2. In shell, you can run the following commands:

Code:
/etc/init.d/httpd stop
killall -9 httpd
/etc/init.d/httpd startssl

If you receive any errors on restart other than Virtual Host warnings such as a failed to restart error, check the line it mentions is the issue with it starting, and go into http://dedicated@lunarpages.com/ to speak to a system admin to assist with getting Apache running for you and troubleshooting the error.

Please let me know if you have any questions by posting them here.

Thanks. Smile
« Last Edit: September 12, 2006, 11:04:07 PM by Danielle » Logged
DSB
Computer Nerd
Jabba the Hutt
*****
Offline Offline

Posts: 597


Programmer of things...


WWW
« Reply #1 on: September 12, 2006, 11:42:21 AM »

cough* cannot upgrade Apache & PHP due to OS currently, cPanel upgraded *cough
Logged

Danielle
Guest
« Reply #2 on: September 12, 2006, 11:04:23 PM »

What is your OS?  Is that the error output?  Please email dedicated@lunarpages.com or dedicated_upgrades@lunarpages.com (this one we just created for upgrade questions) along with your server's name or domain name to have us check into it.  Please provide in the ticket the exact full error output along with what command you have ran that produced it.
Logged
DSB
Computer Nerd
Jabba the Hutt
*****
Offline Offline

Posts: 597


Programmer of things...


WWW
« Reply #3 on: September 12, 2006, 11:28:48 PM »

No, sorry.  I was referring to this:  Link

Your tagline for the post was:

"Hi,

On cPanel servers, upgrading Apache and PHP is relatively easy.  You can choose to do it either in WHM (Webhosting Manager) or in shell."

I was just giving you grief.  Yeah, I know it's the last thing you need but...

 Grr..!! Grr..!! Grr..!!
Logged

Danielle
Guest
« Reply #4 on: September 13, 2006, 12:17:20 AM »

It is easy on dedicated, though, as all are Centos but maybe 0.01% Smile
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: