Website Applications Fail to Load after HostGator PHP Upgrade - [FIX FOUND]

PHP configuration Plugin by HostGatorHave your website PHP Contact Forms, Login Forms or similar applications stopped working after the recent PHP upgrade made by HostGator? If your answer is yes then today we will discuss the easiest way to counter this problem and fix all your PHP configuration issues. Hostgator often updates all your packages to keep your sites compatible with latest changes in server scripts and to offer better performance and security but sometimes such updates may cause your site applications to stop working. This problem is mostly encountered with Wordpress blogs and PHP forms on a site. This update is simply a change made to your site's .htaccess file. We will use the Plugin available at your HostGator Cpanel plugin called "PHP configuration Plugin" to view or modify your server's script configuration.

PS: For techy geeks who are curious how exactly this plugin does this, we will also discuss how to insert a manual handler in the .htaccess file.

The default version of PHP employed by Hostgator servers were all updated to PHP 5.4 on 5/7/2014, the prior version was PHP 5.2. If in case if your site uses an older script that is incompatible with a newer PHP version, we will simply revert the settings of your site back to PHP 5.2. To know how to do it please follow the steps below:

 

Modify PHP Version for Your Site

The PHP Configuration plugin in cPanel allows users on Shared and Reseller servers to easily enable a specific PHP version for a site without having to manually add a handler to the .htaccess file. To update the PHP version for a site:

  1. Log into cPanel.
  2. In the Advanced section, click on the PHP Configuration icon.
    hostgator php configuration plugin

    3.    Now in the next screen Click public_html

public_html

     4.    Now you will see a list of all sites and subdomains that you created with Hostgator. This is basically your root directory. Click the drop down box and switch back to PHP 5.2.!

Note: If in future Hosgator updates the system to PHP 5.5 then you will need to switch back accordingly to PHP 5.4 instead of PHP 5.2.

PHP 5.2 applied to all folders

   5.  Hit the update button and you are all done!

 

Your scripts are still not working?

If after the switch back your site continued not working then it means your particular domain or sub-domain is still using the newer version instead of the older one. Now you will need to further dig down to make one extra change.

Navigate to the directory for which you'd like to update the PHP version. For example in my case I will revert the PHP version to 5.2 for my Contact Page which did not work even after I applied the PHP 5.2 to root directory as discussed in previous STEP#4.

.php file extension

 

When this directory opens, you will observe that the HostGator has assigned it the No Custom PHP handler (Sys default) value which is PHP 5.4. See the screenshot below:

custom php handler

 

You will need to manually select the PHP 5.2 option.

apply old version of PHP

Hit update and you are all set! This made our contact form work just fine!

 

How to add a Manual PHP Handler?   [ For Geeks only! ]

 

  1. Open Notepad or a text file
  2. Paste the following code inside it

<IfModule mod_suphp.c>
    suPHP_ConfigPath /opt/php52/lib
</IfModule>

 

# Use PHP52 as default
AddHandler application/x-httpd-php52 .php

Simply replace php52 with the PHP version you wish to revert to. Make sure you don't add a decimal point in the version number. Write 5.2 as 52 simply.

    3.   Save them file with this file name and extension. .htaccess

     4.  Upload this file via Filezilla or any FTP client onto your desired directory. And you are all done!

This is the exact same way of adding a php Handler which the PHP Configuration Plugin uses.

Let me know if you needed any help. Peace and blessings buddies! :)

If you don't want to get yourself into Serious Technical Trouble while editing your Blog Template then just sit back and relax and let us do the Job for you at a fairly reasonable cost. Submit your order details by Clicking Here »

7 comments

PLEASE NOTE:
We have Zero Tolerance to Spam. Chessy Comments and Comments with 'Links' will be deleted immediately upon our review.
  1. Mustafa bro , indeed you are a genius guy . I think you should start a new blog about WP tutorials and tricks , I have seen your expertise in this tutorial .

    Keep guiding us and solving our problems ... Best regards

    ReplyDelete
  2. yup he is really great guy he is doing great job.. here...
    ansmachine.blogspot.com

    ReplyDelete
  3. Si always made a very comprehensive tutorial to your readers like me. More,more,more power to whole MBT family!

    Regards
    Bloggingtipsandtrix.blogspot.com

    ReplyDelete
  4. Thank you for your tip!
    http://www.bloggingtopics.com/

    ReplyDelete
  5. www.softoftechnology.blogspot.com
    Computer Solution, Computer Tricks And Tips, Window Tricks, Facebook Tricks, Youtube Tricks, Video Tutorial, Make Money Online.

    ReplyDelete
  6. in server scripts and to offer better performance and security but sometimes such updates may cause your site applications to stop working. This problem is mostly encountered with Wordpress blogs and PHP forms on a site. http://revcache.com/hostgator-discount/

    ReplyDelete