Upgrading GoDaddy Hosting to PHP 5.x from PHP 4.3.11

Update 2/22/2010: It looks like changing .htaccess is no longer necessary. After you select PHP 5.x, your site will begin using version 5.2.5 without any further configuration.

The following applies to older domains. As of early 2009, newly purchased linux hosting plans are running PHP 5.2.8, while older plans, once updated, only go up to PHP 5.2.5. I’ve had Ardamis.com hosted at GoDaddy since 2005, and quite awhile ago I thought I had upgraded to PHP version 5 from 4.3.11, but tonight I happened to check with phpinfo and found I was still on version 4.

In the unheard of ten minutes that I was on hold waiting for technical support, I figured out how to really run my pages on PHP 5.x (in this case, 5.2.5).

Log in and go to your Hosting Control Center. You must be running Hosting Configuration 2.0 to go any further, so if you haven’t touched your domain in years, do that first.

Click on Content, then Add-On Languages. Next to PHP Version, select PHP 5.x and click Continue. You’ll get a message that “Changing to PHP 5.x may make your PHP files run incorrectly.” Highly unlikely these days, but OK, you’ve been warned. Notice, too that it says “PHP 5.x will be activated“. Click Update.

It may take awhile for this change to be processed by the server, but once your Account Summary is displaying PHP Version: 5.x, it’s time for the really important part.

You see, you’ve only made PHP 5.x available at this point. Your *.php files are still running in 4.x. Go ahead and check phpinfo again.

Now, you could simply edit .htaccess to change the extensions, like so:

AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4

More details at http://help.godaddy.com/article/1082

But if you’re squeamish about changing .htaccess yourself, there’s another way to set 5.x to be the default handler for *.php files. All the following does, strangely enough, is to add the AddHandler x-httpd-php5 .php to the beginning of your .htaccess file.

Back in the Hosting Control Center, click on Settings, then File Extension. If the change to 5.x has been completed, you’ll see at the bottom of the available extensions list, “Extension -> .php | Runs Under -> PHP 5.x” If it’s not there, stop here and come back in an hour or so.

Click on Custom Extensions at the left. This should be empty, with a message stating “No custom extensions have been created.”

Click on Default Extensions and then click on the Edit button (it looks like a piece of paper and a pencil) to the right of .php | PHP 5.x. Click on Continue.

Click again on the Custom Extensions button on the left, and you should now see “Extension -> .php | Runs Under -> PHP 5.x”. Check your phpinfo page one more time, and it should report PHP 5.x.

It’s unfortunate we even have to do this for our older domains, but I asked the tech support guy if I could somehow get on to PHP 5.2.8, and he said nope, that the newer servers have the more recent version but the older servers are stuck back in 2007.

20 thoughts on “Upgrading GoDaddy Hosting to PHP 5.x from PHP 4.3.11

  1. Erik

    didn’t really work for me, maybe I need to wait longer but after an hour, I expected it to be done. What didn’t seem to work was when I went into the file extention i see php4 and php 5. I clicked the custom then back to default, clicked edit and clicked ok. then back to custom and nothing. It did do a popup saying it was saved but I havn’t seen the chang in my Joomla system info. I’m tired and have to get some mass effect2 going so maybe in the morning it’ll work. Strange things w/ godaddy. I miss the days of Blue Domino….

  2. John Pfeiffer

    Thanks! I was trying to get the Drupal Backup & Migrate module going and got the long error ending in “…/destinations.s3.inc on line 24″

    Googled that, got “only supports PHP5″ from the developer reply to a similar bug. So yup, now I’ve used your good instructions!
    Thanks! -John Pfeiffer

  3. cfitz

    HI One wrinkle: In Godddy Account manager go into ‘Add Applications’ option and click php5 box to enable it to recognize both php4 and php5 extenions you have already had set up.

    thanks for the info!

  4. Pingback: How to Enable Facebook Connect on a WordPress Blog - Jesse Wilson's Tech Blog

  5. andrew

    thank you, thank you, thank you, thank you, thank you. i was beginning to believe godaddy was so incredibly barbaric that they hadn’t yet upgrade to PHP5. the interface to change 4 -> 5 is not where i thought it’d be and the rule in the .htaccess sealed the deal. thanks so much.

  6. Pingback: If Your Plugins Aren’t Working | cyandev

  7. paris

    thanks for this info!
    in my case php was a 4.4.9 and after doing the “Add-On languages” and waiting, .php files were still being parsed as php4 until i modified the .htaccess file as mentioned above. after doing that phpinfo tells me i have version 5.2.14 – so maybe different servers are running different versions. too bad we can’t have the latest.

  8. LC Roque

    Thank you. Thank you. THANK YOU.

    Worked like a charm. Knew it worked immediately b/c I was able to update WordPress, which had previously refused to update automatically.

    One small note: For me, when I looked at the Hosting Control Center, I saw 2 lines. The first said “Extension -> .php | Runs Under -> PHP 4.x”. The second said “Extension -> .php5 | Runs Under -> PHP 5.x”. So for me, I did the following, based on your instructions above, with my changes noted between the **_**:
    —————————-
    “Back in the Hosting Control Center, click on Settings, then File Extension. If the change to 5.x has been completed, you’ll see at the bottom of the available extensions list, “Extension -> .php**5** | Runs Under -> PHP 5.x” If it’s not there, stop here and come back in an hour or so.

    Click on Custom Extensions at the left. This should be empty, with a message stating “No custom extensions have been created.”

    Click on Default Extensions and then click on the Edit button (it looks like a piece of paper and a pencil) to the right of .php | PHP **4**.x. Click on Continue. **In the dropdown box, change PHP4.x to PHP 5.x.**

    Click again on the Custom Extensions button on the left, and you should now see “Extension -> .php | Runs Under -> PHP 5.x”. Check your phpinfo page one more time, and it should report PHP 5.x.

    ———————-

    THANK YOU. Your instructions were a HUGE help.

  9. Kir

    Thank you. I took confidence from this post to upgrade one of my hosted-at-GoDaddy sites to php 5.x.
    Now my File Extensions table reads:
    ————————————-
    Extension Runs under
    .php4 PHP 4.x
    .php5 PHP 5.x
    .php PHP 5.x
    ——————————-
    and the phpinfo is updated (turns out its version 5.2.17 now, not 5.2.5 — not a big surprise).
    I’ll remember to add custom extensions if I need to.
    Off to work on a client site now I’ve tested this on a spare…

    Thanks again.

  10. Gurpreet

    Thank you so much. Was scratching my head from yesterday, but the PHP Info was still showing PHP 4.4.9. Your article solved my problem in 5 minutes. Thank you so much.

  11. JOEyGADGET

    Thanks for post – and special thanks to ** LC Roque ** for clarifying the step “Click on Default Extensions and then click on the Edit button (it looks like a piece of paper and a pencil) to the right of .php | PHP **4**.x. Click on Continue. **In the dropdown box, change PHP4.x to PHP 5.x.**” which corrected the trouble I was having trying to make this work. Thank you, LC Roque! JOEyGADGET

  12. Ginette

    I don’t usually leave comments, but just wanted to say THANK YOU for this fix. I made the update to PHP 5.2.x by clicking the radio button in Content > Programming Languages and waited a couple of hours, but WordPress still said I was using PHP 4.4.9. This fix worked within minutes.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>