Skip to main content

Enable PHP Version Switching

Comments

9 comments

  • Jcats
    Hello, Yes the option is available in both WHM and cPanel called: MultiPHP Manager If you don't see this, you are running EasyApache3 in which you need to upgrade to EasyApache4. How to Migrate Between EasyApache 3 and EasyApache 4 - EasyApache 4 - cPanel Documentation Once you do, you can then install and allow switching from PHP 5.4, 5.5, 5.6, 7, and 7.1
    0
  • gwen_the_hen
    Great! Thanks for such a swift reply. Do you recommend doing this in most cases? Are there any concerns about doing so?
    0
  • Jcats
    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:
    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.
    0
  • gwen_the_hen
    Awesome, thanks. The cPanel documentation (How to Migrate Between EasyApache 3 and EasyApache 4 - EasyApache 4 - cPanel Documentation) doesn't seem to match up with what I can see in WHM - there's no migrate option in EA4, it just says I can't use it while EA3 is active. I found another link that recommends running the following as root: /scripts/migrate_ea3_to_ea4 --run Is that what you'd recommend? Thanks for your help.
    0
  • Jcats
    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
    0
  • gwen_the_hen
    OK great, I will give it a go - thanks!
    0
  • Jcats
    No problem!
    0
  • germany
    For this goal I use - MultiPHP Manager.
    0
  • cPanelMichael
    Hello @gwen_the_hen, You may want to update cPanel to the latest version available on your build tier before converting to EasyApache 4. Let us know how it goes, or if you have any additional questions. Once EA4 is installed, users can browse to "cPanel >> MultiPHP Manager" to change the PHP Versions: MultiPHP Manager for cPanel - Documentation - cPanel Documentation Thank you.
    0

Please sign in to leave a comment.