No announcement yet.

PHP Selector not changing PHP version

  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP Selector not changing PHP version


    I have an issue with PHP Selector where it wont select the correct version.

    I just installed a new server with Cloudlinux 7 + cPanel. It runs EA4 + CageFS + PHP Selector. Im using PHP 7.0 as native EA PHP version. I let users choose the PHP version from PHP Selector.

    For the EA4, I installed the Hardened PHP from the Imunify360 settings tab, which gives me PHP 5.3, 5.4, 5.5, 5.6, 7.0 and 7.1 to run as native. As previously mentioned, I keep PHP 7.0 as native. After that, I installed Cloudlinux alt-php and enabled the same versions for PHP Selector (5.3, 5.4, 5.5, 5.6, 7.0 and 7.1).

    From WHM -> MultiPHP Manager the MultiPHP Manager works fine and can change the PHP versions instantly. After seeing that it works, I put the account on "Inherited" in the MultiPHP Manager. Going to PHP Selector, when I try to change the version, it just doesnt work. It still shows me the MultiPHP version inherited from the settings in MultiPHP Manager.

    Is there a log for me to look at and try to debug this myself? Is there a setting that needs to be checked?

    Thank you.

  • #2

    What is on a top of my head is ea-apache24-mod_suexec package. Please check if you have it installed.

    If package is there - place simple PHP script to identify if php works as user and if it enter CageFS:

    echo Current php process is running as: ;
    $processUser = posix_getpwuid(posix_geteuid());
    print $processUser[name];
    echo <br><br> List files in / , compare if same in real filesystem or you see CageFS <br>;
    $dir    = /;
    $files1 = scandir($dir);
    Otherwise just create a support ticket with us and we will check your server.


    • #3

      With your tests, I see that the user is somehow not in CageFS. When I issue `cagefsctl --list-enabled`, I get the following:

      [root@server1 /]# cagefsctl --list-enabled
      1 enabled user(s)

      But when I use your script, the files and folders are the one actually on the server. Should I reinstall CageFS or should I update to the beta version?

      [root@server1 /]# rpm -qa | grep cage

      Also, when I try to access cPanel -> Select PHP Version, it doesnt show me that the user isnt inside Cagefs, although it should.

      Regarding suexec, I have the following package installed:

      [root@server1 /]# rpm -qa | grep -i suexec

      This EA4 profile was installed through the Imunify360 Hardened PHP.

      Thank you.


      • #4
        CageFS reinstall will not help, it is something in apache configs.

        If you see a right username with my script, however directory list from server / instead of cagefs / - I bet you run RUID2 module which is not supported by CageFS/PHP-Selector .

        Check our compatibility matrix:


        • #5

          Ive never used mod_ruid2 and it wasnt installed with the EA4 profile. I checked the EA4 profile in the WHM interface which was installed through Imunify360 profile and mod_ruid2 is currently not installed on the server. Checking rpm for this package returns zero results:

          [root@server1 log]# rpm -qa | grep -i ruid
          [root@server1 log]#

          Let me know what you think this might be.


          • #6
            Well Ok, its time to create support ticket with us so we can check your server.


            • #7

              Ok. I opened a ticket.


              • #8

                The Cloudlinux support team found the problem. Suexec was installed from cPanel repos, which meant it didnt have lve support for the user to enter CageFS (so PHP Selector couldnt work). To disable the EA4 repo from cPanel and enable the cloudlinux one, run the following command:

                cd ~; wget; sh cloudlinux_ea3_to_ea4 --convert

                This can be found in the documentation here:

                Also the recommendation was not to install the Hardened PHP profile from the Imunify360 interface, as PHP from Cloudlinux is already patched for security.

                Thank you.


                • #9

                  I experiment this same error, we use in server the follow config:

                  Cpanel + Cloudlinux (Lve, PHP-Selector, DB-Governor, etc) + EA3, we would to like change from EA3 to EA4, somebody can help me to do this change? some guide to follow?


                  • #10

                    If the steps described at did not help you, please contact our support by submitting a ticket at


                    • #11
                      [*] Same issue I am having no reply to my ticket


                      • #12
                        Please, provide me with a ticket ID so I can track it.


                        • #13
                          Im experiencing the same issue second time during past few days. Still trying to figure out why is it happening and how to fix it.


                          • #14

                            Please, submit a ticket with us at so we can help you with the issue