Lunarpages Web Hosting Forum

Author Topic: How do you upgrade to php 5 on dedicated?  (Read 7698 times)

Offline codenameviper

  • Spacescooter Operator
  • *****
  • Posts: 40
How do you upgrade to php 5 on dedicated?
« on: June 03, 2010, 07:33:58 PM »
Its easy to upgrade to php 5 on the shared hosting plan through CPanel, but how do you upgrade a dedicated server to php 5?  There is no option in Cpanel, do I need to do it through WebHostManager, or maybe SSH?  I would need at least php 5.2 since its for a Drupal site.  Thanks in advance, my questions seem to always get great answers here.

Offline perestrelka

  • Master Jedi
  • *****
  • Posts: 1397
Re: How do you upgrade to php 5 on dedicated?
« Reply #1 on: June 03, 2010, 09:56:48 PM »
Hi,

cPanel control panel allows easy Apache update from WHM interface. Just click on "EasyApache (Apache Update)" entry under software and go through the EasyApache wizard changing the needed settings (like PHP version). Do not forget to ensure that you activated all PHP modules required for your sites.
Kind Regards,
Vlad Artamonov

Offline codenameviper

  • Spacescooter Operator
  • *****
  • Posts: 40
Re: How do you upgrade to php 5 on dedicated?
« Reply #2 on: June 06, 2010, 12:32:24 AM »
thanks for the reply.  I have a question as to how much damage I can do to my site if I do the install incorrectly. I notice it gave an immediate warning that said if I start apache rebuild and do not finish, my site could stop working.  If all I am wanting to do is upgrade to php 5.3 or whatever the max is, can I skip everything else?  My site is currently on apache 2.0, I was just worried that if I did something wrong I would have to wait several hours or days for tech support to get my site working again.
Thanks.

Offline perestrelka

  • Master Jedi
  • *****
  • Posts: 1397
Re: How do you upgrade to php 5 on dedicated?
« Reply #3 on: June 08, 2010, 11:40:01 PM »

Well, nobody gives you 100% guarantee that everything will work update update, that is why there is a warning there. As per my experience, Easy Apache is pretty stable and if it fails to compile something it simply leaves the old version of softwares running. So, if you are sure  that you scripts are compatible with PHP 5.3, I would give it a try. If something happens that stops your site from the resolving, just call dedicated support to get immediate assistance.

Additionally, if you have managed intense addon purchased with your plan, Lunarpages admins can do the update for free for you. Otherwise, there will be custom configuration free of 60$ for each 30mins of work. EasyApache shouldn't take more than 30 mins, unless something wrong happens.

Finally, I would like to mention that dedicated customers have priority support on the desks and there should be no tickets waiting for days of reply to them.

Please advise, if you have any adidtional questions.
Kind Regards,
Vlad Artamonov

Offline codenameviper

  • Spacescooter Operator
  • *****
  • Posts: 40
Re: How do you upgrade to php 5 on dedicated?
« Reply #4 on: June 09, 2010, 07:20:38 PM »
You are correct about the fast service on dedicated plans, I notice they respond to me a lot faster.  They said they will charge me $75 to do this, but they told me I can do it myself and I think they are pretty much encouraging me too.  I will give it a shot this Sunday, late at night in case I screw something up and need to wait for them to fix it.

You mentioned making sure I activate all required php modules for my site, I was wondering how I would know which modules to activate. I just did a Google search on this and couldnt find much. I will be using Drupal on the site if that helps any.

I think I am going to go with php 5.2 for now, I have read that Drupal is not totally compatible with php 5.3 yet, thanks for your help so far.

Offline perestrelka

  • Master Jedi
  • *****
  • Posts: 1397
Re: How do you upgrade to php 5 on dedicated?
« Reply #5 on: June 21, 2010, 03:27:21 AM »

Did you try the upgrade already? If not, for your modules questions, you can review the current compiled modules by using the same Easy Apache wizard and then ensure that the same will be activated for the new PHP version.

To review the modules open Easy Apache in WHM, click the "Start customizing based on profile" button, then click "Next" till you get to the choice with  "Save and build" or "Exhaustive Options List" buttons. Click the second one and you'll be shown all the modules build in the current setup.
Kind Regards,
Vlad Artamonov

Offline codenameviper

  • Spacescooter Operator
  • *****
  • Posts: 40
Re: How do you upgrade to php 5 on dedicated?
« Reply #6 on: June 28, 2010, 08:46:39 PM »
I had tried this and it seemed pretty easy, but after the build was complete my site did not work. I went with the lowest php version which was 5.2 and once it was upgraded when I went to my site I was not able to view any of my pages, instead my browser was attempting to download each page I went to.  I cleared my cache, tried on Firefox, IE and even Chrome, and all 3 attempted to download each page, even the pages that did not have php code on them.

I dont think it would be my script or code I currently use on my site, because I upgraded a shared hosting plan with the same code to php 5.2 and that site worked fine. Do you think I need to add something extra to my main .htaccess file, or add another file in general?  Or maybe it was something to do with me needing one of the modules? I am on Apache 2.0 if that helps. I was able to get the site working again by switching it back to php 4.4, however I really want to install Drupal on my dedicated plan, so I do need php 5.2 to work, thanks for your help so far.

Offline perestrelka

  • Master Jedi
  • *****
  • Posts: 1397
Re: How do you upgrade to php 5 on dedicated?
« Reply #7 on: July 02, 2010, 04:23:30 AM »

Did you check Apache error logs when PHP stopped working? It could be done via shell or in cPanel on your account. From the problem description it appears that handler configuraion for PHP got broken. Do you have PHPSuExec installed on your account or PHP handlers defined in .htaccess under public_html folder?
Kind Regards,
Vlad Artamonov

Offline codenameviper

  • Spacescooter Operator
  • *****
  • Posts: 40
Re: How do you upgrade to php 5 on dedicated?
« Reply #8 on: July 04, 2010, 11:40:40 PM »
My htacess file currently says:

ErrorDocument 404 /404.shtml

RemoveHandler .html .htm .shtml
AddType application/x-httpd-php .php .htm .html .shtml

I assume you cant use these on php 5.2?  Because I made a phpinfo file and it said 5.2 was installed, but the site was still doing the same thing again where it was forcing me to download the pages, instead of being able to view them.  All I am doing is going into EasyApache and doing the build to php 5.2 and nothing else.  Maybe I am supposed to take an extra step like make a php ini file, or Apace Restart, etc.  I even removed the above code completely from my htacess file and the site still did not work with php 5.2 installed.

The way my pages are currently setup is they are .htm extension and I use php include codes that look like this:

<?php include($_SERVER['DOCUMENT_ROOT']. "/header.php"); ?>

Maybe you cant do this with php 5.2, or you cant parse this in 5.2 on the htaccess file and have to parse it somewhere else? thanks.

Danielle

  • Guest
Re: How do you upgrade to php 5 on dedicated?
« Reply #9 on: July 05, 2010, 10:54:42 AM »
Try this instead in your .htaccess file:

Code: [Select]
AddHandler application/x-httpd-php5 .php .htm .html .shtml
I don't know why you would even need to have the RemoveHandler line. They get changed via the AddHandler, so remove the other line by commenting it out.

Offline codenameviper

  • Spacescooter Operator
  • *****
  • Posts: 40
Re: How do you upgrade to php 5 on dedicated?
« Reply #10 on: July 05, 2010, 10:15:23 PM »
thanks, that did the trick.  Looks like my problem all along was my htaccess file. So it is easy to upgrade php on EasyApache as long as you have your htaccess correct, thanks again to both of you for your help.

Danielle

  • Guest
Re: How do you upgrade to php 5 on dedicated?
« Reply #11 on: July 06, 2010, 05:14:25 AM »
You are very welcome. I'm glad that worked :yey: