How do I choose PHP 5.2 or PHP 5.3?

At MDDHosting we're always working to offer you the best possible service and as a a result we've put hours of server administration into enabling both PHP 5.2 and PHP 5.3 on our servers for you.  This means that if your script doesn't work on 5.3 you're not forced to use it and if you need 5.3 for a certain script you have full access to it.  You can even run both 5.3 and 5.2 from within the same account at the same time!

By default all accounts will have their .php files handled by PHP 5.2 and if you wish a file to be handled by PHP 5.3 you simply need to change the extension of the file to .php53. For example:

  • index.php will be handled by PHP 5.2
  • index.php53 will be handled by PHP 5.3

If you wish for all of your .php scripts to be handled by PHP 5.3 you can do this using one of two methods:

  1. The quickest way to enable this is to simply open your ".htaccess" file in your /public_html folder and add this line:
    AddType application/x-httpd-php53 .php
  2. The more user-friendly but time consuming method is to add this entry via your cPanel.

    1. Log into your cPanel account.
    2. Access the "Apache Handlers" option under the "Advanced" section.
    3. On the "Apache Handlers" page enter the following information:
      • Handler: application/x-httpd-php53
      • Exention(s): php

If you need to access the CLI version of PHP 5.3 such as for a cron job you can do so using the command "/usr/bin/php53".



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read

Powered by WHMCompleteSolution

Quick Navigation

Client Login

Email

Password

Remember Me

Search



Follow Us on Twitter