Announcement

Collapse
No announcement yet.

PHP selection change for account in CageFS appears to not take effect for that account

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

  • #16
    I suppose php binary inside CageFS is not linked properly, could you please show the same from your side? Here is from one of test user:

    Code:
    # su -l cltest3
    
    # which php
    
    /usr/local/bin/php
    
    # ls -la /usr/local/bin/php
    
    lrwxrwxrwx 1 root root 24 Jan 17 16:51 /usr/local/bin/php -> /etc/cl.selector/php-cli

    Comment


    • #17
      UPDATE
      After checking this server I noted /etc/cl.selector/native.conf was missing, as a result selector did not know where are native binaries and what to switch by symlinks. The /usr/share/cagefs-skeleton/usr/local/bin/php was regular file, while it should be a symlink to unexisting in real system /etc/cl.selector/php-cli .

      I created native config

      > # cat /etc/cl.selector/native.conf
      > php=/usr/bin/php
      > php-cli=/usr/local/bin/php
      > php.ini=/usr/local/lib/php.ini
      > php-fpm=/usr/local/sbin/php-fpm
      > lsphp=/usr/local/bin/lsphp

      Then run cagefsctl --setup-cl-selector and that did the trick.

      The native.conf file is created on primary cagefs installation phase when it detect control panel, could it be possible cagefs was installed before cPanel ?

      Comment


      • #18
        Thanks for your help. I provisioned the virtual machine and it had CloudLinux installed. I then immediately installed cPanel. After that, I went to WHM and installed the LVE-related and CageFS via both the web and SSH. Maybe all the mucking around I did afterwards made some changes?

        Comment


        • #19
          With the order you gave everything should be fine. Not sure why issue happened origianally there.

          Comment


          • #20
            Ok, this is happening again on a similar, though not identical, situation. About 2 hours ago I requisitioned a new VM running CloudLinux and cPanel. I installed cPanel from command line and all went well. I then installed LVE and all went well. But when I added a new user in WHM and then looked in that users cPanel under "Select PHp Version", it told me the user was not in CageFS.

            So I ran:

            Code:
            /usr/sbin/cagefsctl --enable-all
            And then the user appeared to be in cageFS. But then I rebooted everything and loaded the users cPanel and saw this message:

            Code:
            Config file (Cannot read /etc/cl.selector/selector.conf: [Errno 2] No such file or directory: /etc/cl.selector/selector.conf. Native used) not found
            What do I need to do to fix this?

            many thanks~

            Comment


            • #21
              I just migrated an entireWordPress site to this new server and when I visit it in a browser I encounter the "cgi-sys/defaultwebpage.cgi" page. When I upload a simple test.php to the sites account, I also get a 404 error... so seems like a related PHP issue?

              Comment


              • #22
                Sorry to keep pinging this thread, but Im doimng more work on looking at this. I terminated the account on WHM and created a new one and installed everything again on that users site. Again, same problem. I also created a testdb.php that tries to check the mysql connection and I get errors connecting to the db....

                So I ran /etc/init.d/mysql start and MySQL started fine, but still getting db connection errors. Could all this be connected? CageFS, php, MySQL? Btw, this morning I loaded this user on a different VM running CentOS 7.x and all worked fine, so its not the users account or permissions or other things -- it seems to be related to how the server was setup.

                Comment


                • #23
                  OK, I solved half of my problem. I went to Service Manager and ticked the "PHP-FPM service for cPanel Daemons". Then reloaded everything and MySQL worked fine.... weird, and Im not sure why that PHP-FPM was not ticked before. And, then I installed an SSL from Comodo on the users account and it worked all fine.

                  But I still have the "Select PHP Version" issue and Ill continue looking for how to fix that.

                  Comment


                  • #24
                    This all sounds really strange, we would like to check your server to find the root case. Please create support ticket at https://helpdesk.cloudlinux.com/ and provide ssh/cpanel access .

                    Comment


                    • #25
                      I just installed a fresh server today and again ran into this problem. I fixed it by running "/usr/sbin/cpanel-compile-suphp.sh" as root though and now all is fine and working well~

                      So I built a lot of CloudLinux servers in the past few months (love it guys, great OS, and it solves many issues) and this is the 3rd time Ive run into this issue. Most machines are on the same hardware/platform. Just an FYI...

                      Comment


                      • #26
                        Could you provide me with steps what was done on that server? It really is important, I would like to get something like:

                        > - install CentOS 6
                        > - convert to CloudLinux
                        > - install cpanel
                        > - install CageFS
                        > - init CageFS
                        > - got the issue

                        Thanks!

                        Comment


                        • #27
                          Hello:
                          Thats a great question and I have a recipe I follow for each server:

                          0) Build server from VPS.net. Make sure to use 6.x x64 (this may change in the future when they fix EasyApache to work with 7.x) image. This should take about 2 minutes, and then login via SSH as root.

                          1) First install cPanel. This may take a long time.

                          2) Then install LVE with this:
                          yum install lvemanager

                          3) Then install CageFS (or confirm it’s installed with these commands):
                          yum install cagefs
                          /usr/sbin/cagefsctl --init

                          /usr/sbin/cagefsctl --enable-all

                          4) Install PHP Selelector:
                          yum groupinstall alt-php
                          yum update cagefs lvemanager

                          5) Then in WHM make sure in “Tweak Settings” to “Allow Remote Domains” — make sure it is enabled!

                          6) Make sure "PHP-FPM Service for cPanel” is enabled (you can do this when you install cPanel and do the initial web-based configuration.

                          7) After we make changes to php.ini, we should then make updates to all users with this command:
                          cagefsctl --update

                          8 ) GO into WHM and do this:
                          a) Change the Server Time
                          b) Go to Tweak Settings and make changes in long list
                          c) In Server COnfiguration/Apache Configuration please untick "Indexes default"
                          d) PHP COnfiguration Editor
                          e) Backup Configuration
                          f) Create User Package
                          g) Change MySQL Root Password
                          h) EasyApache
                          i) Other things

                          9) Should be all done, but if PHP Selector does not work correctly, then try this:
                          1) Install suPHP patches:
                          # /usr/sbin/cpanel-compile-suphp.sh

                          10) If things still don’t work on PHP Selector, do these commands:
                          # mv /etc/cagefs/cagefs.mp /etc/cagefs/cagefs.mp.old
                          # cagefsctl --create-mp
                          # cagefsctl --remount-all; cagefsctl --force-update

                          Comment


                          • #28
                            I do not see a place where it could fail... Especially after 8.h easyapache, as /scripts/posteasyapache contains needed hooks to recompile suphp .

                            Please provide me with the output form this server:

                            Code:
                            /usr/bin/cldetect --cpanel-suphp-enabled
                            
                            echo $?
                            and

                            Code:
                            /usr/local/cpanel/bin/rebuild_phpconf --current

                            Comment


                            • #29
                              Heres the first output:

                              Code:
                              root@server88 [~]# /usr/bin/cldetect --cpanel-suphp-enabled
                              
                              root@server88 [~]# echo $?
                              
                              0
                              and the second:

                              Code:
                              root@server88 [~]# /usr/local/cpanel/bin/rebuild_phpconf --current
                              
                              Available handlers: suphp dso cgi none
                              
                              DEFAULT PHP: 5
                              
                              PHP4 SAPI: none
                              
                              PHP5 SAPI: suphp
                              
                              SUEXEC: enabled
                              
                              RUID2: not installed
                              I also ran df -h and saw for the past few weeks the server was at about 84% in disk size. So I doubled the RAM and doubled the size yesterday and rebooted. That was about 18 hours ago, and no outages appear to have happened yet. I hope maybe it was a case of the disk just getting too big and this solved it. But it goes down about once a day, so I should see any effect in the next 6-24 hours.

                              Thanks~

                              Comment


                              • #30
                                Nothing has crashed on server in about 3.5 days. So maybe the increase disk size solved the problem?

                                Comment

                                Working...
                                X