HOW To Change PHP Version, Module and PHP Variables? PHP Version Switch all of our cPanel Servers are running on CloudLinux OS with cPanel/WHM.
PHP Selector is a CloudLinux feature that allows each cPanel user to select PHP version, module and php variables based on their needs.
You can easily switch between several different PHP Versions such as 5.6, 7.1, 7.2 as well as enable or disable many PHP modules, such as apc, mysqli, gd, pdo, soap and etc, entirely based on your needs. It also allows user to change the PHP Variables/Settings such as: max_execution_time, upload_max_filesize, memory_limit and etc.
PHP Version Switch you can find PHP Selector by login to cPanel >> Select PHP Version. The default php version of any cPanel is set to NATIVE version, which doesn’t allow any modification. But user will be able to set another version from the pull down menu and make modification. Once another version is selected, please click on SAVE button and that specific cPanel will run on the selected version.
Users will be able to enable/disable module by checking and unchecking the modules. Once done, please SAVE again.
Users might want to change php variables as well, for example, If a user wants to increase the memory limit or max upload size, they should be able to increase the value from SWITCH TO PHP OPTIONS menu from top right corner. Once new values has been set, please SAVE the settings.
Sometimes your website may need to use a different PHP version from the one assigned to your whole cPanel account.
To set a different PHP version for an addon domain, you need to add a special code to your .htaccess file. To do this, follow the steps below.
1. Find the .htaccess file for the addon domain in question. The steps for how to find it can be located here.
2. Add the following line to your .htaccess file:
<FilesMatch “.(?:html|php)$”>
SetHandler application/x-lsphpXX
</FilesMatch>
If you are having any issue with PHP Selector feature or want us to setup them for your site, please submit a ticket to support@aptctg.com
Comments are off for this post.