Announcement

Collapse
No announcement yet.

PHP Selector not changing PHP version

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP Selector not changing PHP version

    Hello,

    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
    Hi,

    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:

    Code:
    <?php
    
    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);
    
    print_r($files1);
    
    ?>
    Otherwise just create a support ticket with us and we will check your server.

    Comment


    • #3
      Hello,

      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)
      myuser

      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
      cagefs-safebin-6.0-39.el7.cloudlinux.x86_64
      cagefs-6.0-39.el7.cloudlinux.x86_64

      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
      ea-apache24-mod_suexec-2.4.25-9.9.3.cpanel.x86_64

      This EA4 profile was installed through the Imunify360 Hardened PHP.

      Thank you.

      Comment


      • #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: http://docs.cloudlinux.com/index.htm...ty_matrix.html

        Comment


        • #5
          Hello,

          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.

          Comment


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

            Comment


            • #7
              Hello,

              Ok. I opened a ticket.

              Comment


              • #8
                Hello,

                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 https://repo.cloudlinux.com/cloudlin...nux_ea3_to_ea4; sh cloudlinux_ea3_to_ea4 --convert

                This can be found in the documentation here:

                http://docs.cloudlinux.com/index.htm...yapache_4.html

                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.

                Comment


                • #9
                  Hi,

                  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?

                  Comment


                  • #10
                    Fernando,

                    If the steps described at http://docs.cloudlinux.com/index.htm...yapache_4.html did not help you, please contact our support by submitting a ticket at https://cloudlinux.zendesk.com

                    Comment


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

                      Comment


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

                        Comment


                        • #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.

                          Comment


                          • #14
                            Max,

                            Please, submit a ticket with us at https://cloudlinux.zendesk.com so we can help you with the issue

                            Comment

                            Working...
                            X