PHP Code

Enable PHP 5 on HostGator hosted servers!

Today I downloaded an Open Source PHP web application for project management. One of the system requirements was PHP 5. I checked in cPanel, and was pained to see that Hostgator is only running PHP version 4.4.4.

I've known Hostgator to be very up-to-date with their hosting technology, so I searched the knowledgebase to see if I could find any plans or information on upgrading to PHP 5. There was nothing.

So I contacted support and asked them. I found out that PHP 5 is already installed, but you have to enable it for the web application you'd like to use it on. To do this, you'd modify the .htaccess file, and add this line:


AddHandler application/x-httpd-php5 .php

The installed PHP version is actually 5.1.5. I'm not sure why they don't just enable it server-wide, perhaps it has something to do with backwards-compatibility. I haven't tried to enable it across my account, but I have a feeling that you'd be able to in 'MIME Types' in cPanel.

Share

1 Comments

  1. Thanks. That really helped a lot. Looks like HostGator hid quite a few stuff.

Leave a Reply

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

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image