By default all our Shared and Reseller servers run PHP 5.3.* as the native PHP version, as times move on, many scripts are no longer supporting this PHP version and as such clients need to be able to run a newer version of PHP (5.2, 5.3, 5.4, or 5.5 at the time of writing) on their account.
Making a server wide change to do away with PHP version 5.3.* would be a good move for those clients that have scripts that wont run on PHP 5.3.*, but on the flip side it would also infuriate clients whose scripts will only run on PHP 5.3.* and not any of the newer versions as a move to a newer version would cause their scripts to break.
So to get around this issue, we are running a tool called "PHP Selector", a part of the CloudLinux operating system, which allows users to select the PHP version they would like to run on their hosting account. This allows users who don't need a newer PHP version to stick with 5.2.*, but it also allows users with scripts that require a newer PHP version to be able to quickly switch to their desired version of PHP from within their cPanel interface.
So how do you switch between PHP versions?
Simple! Just log into your cPanel and then follow the steps below:
1. Under the "Software/Services" tab, click on the "Select PHP Version" icon.
2. From the drop down box, select the PHP version you would like to run on your account and click on the "Set as Current" button. If you want to switch back to the default PHP version running on the server at any time, you can select "Native" from the drop down box.
3. After selecting your PHP version, you will see a list of the different PHP modules you can run. If you know the specific modules your script needs to run (check with the script vendors regarding this) then you can select them, else you can click on "Use Defaults" to use the same modules that are running in the servers default PHP configuration.
After selecting the desired modules that you'd like to run, click on the "Save" button.
5. To change individual settings within PHP version in question, click on Switch to PHP Settings.
By clicking on one of the options (in grey), you will be presented with a drop-down list to change specific settings. Hit Apply to implement the settings:
That's it! After clicking on the "Save" button your account will be running your chosen PHP version, rather than the server default.
- PHP Selector sets the PHP version on a per cPanel account basis, it is not possible to set the PHP version per directory. So if you have different scripts running on a single cPanel account with one script requiring a certain version of PHP and another script that requires a different version, you would need to split these scripts up so they were each running on individual cPanel accounts. (A Reseller Hosting account would allow you to do this)
- 10 Users Found This Useful
How to Change Your cPanel Password
This tutorial will teach you how to change your cPanel password. Please remember to make your...How to Park a Domain on an Addon Domain
Untitled Document You can park a domain on an addon domain in cPanel by completing the following...How can I recreate my account from scratch?
Your account can be recreated at anytime to a brand new state, however, you must note the...Can you enable "local-infile" for MySQL?
The commands for LOAD DATA INFILE/OUTFILE, are not allowed on our servers for security reasons....Why am I having problems publishing my site using FrontPage?
Frontpage Remote Authoring is disabled by default on any new account setup. This is because...