PHP Selector: Im wondering if there is a way to specify the Default PHP version for a specific cPanel Package.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • contact
    Junior Member
    Forum Explorer
    • Mar 2021
    • 18

    #1

    PHP Selector: Im wondering if there is a way to specify the Default PHP version for a specific cPanel Package.

    Hi there Im wondering if there is a way, workaround, to specify the Default PHP version for a specific cPanel Package. Without changing it manually once a new account is set up. Ex: - Fictional_Package_1 with PHP 5.6 - Fictional_Package_2 with PHP 7.0 Ive asked CloudLinux Support and this was their answer. So Ive created a Request at https://cloudlinux.uservoice.com please see the link below.
  • bogdan.sh
    Administrator
    • Nov 2016
    • 1219

    #2
    Hello,

    Unfortunately there is no way to do it automatically. I see you created a feature request at uservoice, that is the right way to go.

    But why do you want this feature?

    Comment

    • bogdan.sh
      Administrator
      • Nov 2016
      • 1219

      #3
      Actually, there is a way to do it, just requires some bash coding from you.

      The /scripts/postwwwacct is used after every account creation
      You can write your own script that will detect package name for an account "like **PHP56" and then run:

      Code:
      selectorctl -b 5.6 -u username
      More: https://docs.cpanel.net/display/SDK/...-+Script+Hooks

      Comment

      Working...