Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Quick change of PHP version without losing settings

Discussion in 'EasyApache' started by galbaras, Mar 2, 2017.

Tags:
  1. galbaras

    galbaras Member

    Joined:
    Mar 26, 2013
    Messages:
    19
    Likes Received:
    2
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hello cPanel experts,

    Whenever a new PHP version becomes stable and I want to change a whole range of accounts to using it, I need to reconfigure my choice of extensions and options, and that's just not my idea of fun.

    Is there a way to change the PHP version while retaining extensions and options?

    Can extensions and options be configured elsewhere to override those set on the "Select PHP Version" page?

    If not, how can this be turned into a feature request?

    Cheers,
    Gal
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,532
    Likes Received:
    1,966
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @galbaras,

    If I understand correctly, you'd like an option to account for a scenario like this:

    1. You decide to enable the bz2 PHP extension, so you browse to "WHM Home » Software » EasyApache 4 » PHP Extensions" and enable the following package:

    php55-php-bz2

    2. Later, you decide to switch the accounts to PHP 5.6, and notice the php56-php-bz2 package isn't automatically enabled and thus you have to manually enable it.

    If this is correct, I recommend opening a feature request for the ability to compare the extensions of each PHP version and provide a method to easily enable all missing extensions from one version to another.

    Otherwise, you may find the the ability to create EA4 profiles in cPanel 64 allows you to more easily manage the build profiles:

    EasyApache 4 - Create a Profile - EasyApache 4 - cPanel Documentation

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. galbaras

    galbaras Member

    Joined:
    Mar 26, 2013
    Messages:
    19
    Likes Received:
    2
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    No, my scenario is very different.

    I go into cPanel->Select PHP Version, check some boxes for extensions, then change some option and save. Later on, I switch from PHP 7.0 to 7.1 and everything goes back to default :(

    Although different PHP versions may have different extensions and options, keeping my settings for the ones that are the same seems like better user interface than resetting all of them. With many websites to handle and many settings to change, this quickly amounts to a lot of work, which can be (easily) saved.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    You are referring to CloudLinux's PHP selector.

    Go to WHM > CloudLinux LVE Manager > Selector

    Then there is a drop down called: "Choose default modules for"

    Select each version of PHP and setup your default PHP extensions, do this for each version.

    Now anytime you change the PHP version in "Select PHP Version", these default extensions will be selected, if for some reason they are not, click the "Default" button at the bottom and it will auto fill them.

    Hope this helps!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. galbaras

    galbaras Member

    Joined:
    Mar 26, 2013
    Messages:
    19
    Likes Received:
    2
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Sorry, I didn't state that I was on a shared server, where I don't have access to the system-wide settings for PHP.

    Still, I'm on a reseller package and need to modify many accounts. Can this function be delegated to me?

    Either way, resetting everything when the PHP version changes doesn't seem right.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    604
    Likes Received:
    43
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,
    If you have not root access then you need to contact to your hosting provider as they will change setting server wide.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Unfortunately, nothing you can do, you can ask your web host but I doubt they will use the defaults YOU want as this would affect all users.

    Your best bet is to upgrade to a server where you have root access so you can set the defaults yourself, otherwise do a feature request:

    New Feature Request | cPanel Feature Requests
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #7 Jcats, Mar 2, 2017
    Last edited by a moderator: Mar 10, 2017
  8. galbaras

    galbaras Member

    Joined:
    Mar 26, 2013
    Messages:
    19
    Likes Received:
    2
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    They won't, because I'm only one of many clients on the server. I really need a solution that works in cPanel, not WHM.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. galbaras

    galbaras Member

    Joined:
    Mar 26, 2013
    Messages:
    19
    Likes Received:
    2
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Jcats likes this.
  10. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,532
    Likes Received:
    1,966
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. galbaras

    galbaras Member

    Joined:
    Mar 26, 2013
    Messages:
    19
    Likes Received:
    2
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Thank you, Michael.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice