We are aware of a potentially service impacting issue. Learn more

Selecting PHP version and set correct PHP settings Print

  • PHP, configuring, select, version, php.ini, settings
  • 56

This article is for users of a Cloudlinux environment, this applies to our: Shared hosting accounts, Reseller hosting accounts, Elastic Sites accounts, Optimized Wordpress or Joomla accounts and Managed Dedicated Servers with Cloudlinux OS.

Issue: The most common problem with users is the configuration of the proper PHP version.

History: As Cloudlinux OS servers have 2 versions of PHP; the EA-PHP branch and the ALT-PHP branch. The earlier is the EasyApache branch which is provided by cPanel/WHM ; and the ALT-PHP Branch is provided by Cloudlinux ; as the ALT-PHP branch is providing backwards patches to outdated versions of PHP we prefer this version above the EA-PHP branch, besides it makes it easier to make sure everything is working and the user can select their own modules they need in PHP; which is not possible for end-users in the EA-PHP branch. 

How to configure: As there are 2 versions of PHP there are unfortunately also 2 ways to configure this in cPanel. One cPanel/WHM way to do it, and one Cloudlinux way to do it. Each having their pro's and con's but as we prefer security above all we choose the Cloudlinux way to deal with the PHP version selection. 

  1. Login to cPanel
  2. In the search box at top type: PHP 
  3. You get all PHP relates icons, the first one we give a visit is the MultiPHP manager

The MultiPHP manager is cPanel's version of PHP; here we want to be sure that the configuration of PHP selected here is selected to the 'inherit' version, no matter which PHP version that would be, as long the 'inherit' button shows.

If the site you have configured does not show 'inherit' at the PHP version it uses you can select the checkbox in front of it and then on the right hand corner select the PHP version to 'Inherit' and click Apply. You will see the change and will see the 'inherit' button at the PHP version among the systems default php version, however you may ignore that version as this is what we are going to change in the following steps.

  1. Go back to the cPanel menu, and type 'php' again in the search box on top, now we go to : Select PHP Version
  2. You are now able to select the PHP version you want at the PHP Version; if it does not show the version you want click the version number and select the version from the dropdown menu, at the point of writing this knowledgebase article the latest version is PHP 7.3 but also 7.2 is still supported, all other versions are EOL and should only be used if your software is not compatible with either 7.2 or 7.3 ; if new versions will be made available they will show up in the dropdown box as well. Once selected the version you want the system will automatically select the most needed PHP modules for that version, in general you do not need to change these, just click on 'Set as current'. 
  3. on the right top corner you will see an icon called: 'Switch to PHP options' you may want to click there and see if you need to make any changes there i.e. for configuring the memory_limit post_max_size upload_max_filesize or the max_execution_time 

And that is all there is to configuring the proper and correct PHP version with Cloudlinux OS. 

 

 

 

 

 


Was this answer helpful?

« Back