gwen_the_hen

Member
Sep 3, 2016
22
2
3
Worcester
cPanel Access Level
Root Administrator
Hello,

Is there a simple method for allowing cPanel accounts to switch between various PHP versions? I'm sure in the past I have seen this when using cPanel as a client, but I can't seem to find any option for this aside from using CloudLinux (which I don't want to do currently).

On a related note, would it be possible to install PHP7 as part of this switcher or as a standalone upgrade?
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
797
152
168
New Jersey
cPanel Access Level
DataCenter Provider

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
797
152
168
New Jersey
cPanel Access Level
DataCenter Provider
It can cause issues yes, I'd recommend giving a maintenance period for your users, the web server usually goes down during the transition and depending on how slow/fast the server is the downtime can vary but usually 2~ minutes.

I'd also recommend changing the default PHP limits as the default ones are pretty low like memory_limit and upload file size, example by default I usually do:

Code:
sed -i 's/allow_url_fopen = Off/allow_url_fopen = On/g' /opt/cpanel/ea-php*/root/etc/php.ini
sed -i 's/max_execution_time = 30/max_execution_time = 120/g' /opt/cpanel/ea-php*/root/etc/php.ini
sed -i 's/max_input_time = 60/max_input_time = -1/g' /opt/cpanel/ea-php*/root/etc/php.ini
sed -i 's/memory_limit = 32M/memory_limit = 128M/g' /opt/cpanel/ea-php*/root/etc/php.ini
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 64M/g' /opt/cpanel/ea-php*/root/etc/php.ini

/scripts/restartsrv_apache
You can run that right in SSH, but change the actual options as you see fit.

If all hell breaks loose, and you are not sure what the issue is, you can revert back to EA3 as well.
 

gwen_the_hen

Member
Sep 3, 2016
22
2
3
Worcester
cPanel Access Level
Root Administrator

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
797
152
168
New Jersey
cPanel Access Level
DataCenter Provider
Yes just run that, you are most likely not running the latest version of cPanel then as it was recently implemented to do the migration within WHM instead of using SSH
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter