Installing multiple php version on WHM or cPanel
WHM Cpanel allowed single php version to run and compile. In case you strongly required then you have to move for Cloud Linux by paying extra license fee. Â Â So if you want to run multiple php version without spending extra cost then you can go with option which is ntPHPSelector
You have to follow few steps to make it easier
Enable suPHP handler
- go to WHM > Configure PHP and suEXEC
- set php5Handler => suphp
To install ntPHPSelector on your server
- login with root on terminal/ssh or you can use putty
- go to local user directory to download package
cd /user/local/src - download ntPHPSelector installer script
wget -N https://nixtree.com/download/free/ntphpselector_manage.sh - run script
sh ntphpselector_manage.sh install
make sure your script have permission of execution.
It will install all lower php version according to your current php version. For example if currently you have php 5.4 then this script will install php 5.3,5.2 etc.
After successfully installing it will reload HTTPD service. Now you can login with cPanel . Under Software and services you can see new option ntPHPSelector, Click on this and choose you php version for particular folder like if you want to select for whole site then select public_html folder and choose php version from dropdown.
To recompile php in ntPHPSelctor
run following command
sh ntphpselector_manage.sh recompile <option>
— option 2 for 5.2
3 for 5.3
4 for 5.4
5 for 5.5
eg: recompile php5.2
sh ntphpselector_manage.sh recompile 2
For uninstalling the plugin:
sh ntphpselector_manage.sh uninstall
- Jquery webcam plugin - June 19, 2016
- How To Add and Delete Users on a CentOSServer - June 5, 2016
- How To Set Up vsftpd on CentOS 6 - June 5, 2016
ntPHPselector with Easyapache 4 support is released – https://www.nixtree.com/nt-php-selector.php