HostGator’s upgrade to PHP 5.4

Recently, HostGator sent around some emails saying they were forcing a PHP upgrade to 5.4 in the coming weeks. The steps provided by HostGator are basically:

  1. Login to CPanel
  2. Go to PHP Configuration
  3. Change from 5.2 to 5.4
  4. See if your site works

I’m off work this week to work on my self-published book, so I went ahead and tried the PHP 5.4 upgrade. First, I made sure my sites were backed up and all WordPress plugins/themes were updated.

After running the PHP 5.4 configuration change, my site didn’t work. I received an HTTP 500 error with the cute alligator smiling his smug face at me. I’m on the current version of WordPress with everything (including my database) fully up-to-date. Naturally, the first thing I did was check the error logs in CPanel… empty. Next, I contacted customer support.

I was on with support for 1h 15m. At first, the support representative couldn’t see the internal server error page. She could run through and see my main page. I tried and saw my site, while other proxies and is-it-down-type checkers reported my site as being down.

After some time, we tracked down the following error message:

Cannot load the ionCube PHP Loader - it was built with configuration 2.2.0, whereas running engine is...

I was initially told this was a problem with my theme (which is the default theme with WordPress, btw). I was getting frustrated, but with the error message I was able to Google what would cause this and it turned out to be a php.ini issue. At first, I assumed it was the server’s php.ini causing problems. After about 5-10 minutes of the support representative investigating further, I loaded ~/www/php.ini from within my SSH session and found that the PHP configuration switcher in HostGator’s CPanel doesn’t modify php.ini in any way to account for the updated PHP version.


The fix for this whole problem was to change the version of IonCube used for script loading to match the version of PHP I chose in the PHP Configuration switcher. That’s really something that should be done automatically by a utility. Without error logs displaying in CPanel, I don’t know how the average customer is supposed to figure that one out.

Even after the day of downtime recently, I still give HostGator a 9/10. They’re always quick to respond to customer concerns and very nice. They resolve issues as quickly as possible and provide a pretty solid and affordable hosting environment.

Related Articles