php selector and mod_fcgid and mod_lsapi per account?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oceanwave
    Member
    Forum Explorer
    • Dec 2024
    • 30

    #1

    php selector and mod_fcgid and mod_lsapi per account?

    Can I install both mod_fcgid and mod_lsapi with easyapache 4 and then use php selector or another means to select whether an account uses mod_fcgid or mod_lsapi as the php handler?
    Or would this be inadvisable?
    I'm interested in evaluating a switch from mod_fcgid to mod_lsapi and wondering if I need to
    1.) switch the server with easyapache from one to the other like I did when I changed from su_php to fcgid, or if there is a way to
    2.) switch individual account(s) over and observe before changing all accounts over
  • bogdan.sh
    Administrator
    • Nov 2016
    • 1269

    #2
    You can install both mod_fcgid and mod_lsapi with EasyApache 4, however, PHP handlers are typically configured globally for each PHP version within WHM MultiPHP Manager.

    This means if you set PHP 8.4 to use fcgi in WHM, all accounts using PHP 8.4 will utilize the fcgi handler. The PHP handlers are per PHP version, not per account.

    However, most likely you utilize both ea-php84 and alt-php84 and you can select different handlers for them:
    Click image for larger version

Name:	Screenshot_20250913_115202.png
Views:	253
Size:	23.6 KB
ID:	40725

    And then select eitner ea-php84 or alt-php84 in WHM > MultiPHP Manager > User Domain Settings tab, the dropdown list. You should give it a try.

    Comment

    • oceanwave
      Member
      Forum Explorer
      • Dec 2024
      • 30

      #3
      Awesome. Thanks.

      Any issue if I use Cloudlinux PHP Selector instead of MultiPHP Manager to set the PHP version per account for the last step?

      (Can I set MultiPHP Manager alt-php 7.4 -> lsapi, ea-php 8.3 -> cgi, and then use Cloudlinux PHP Selector to select alt-php 7.4 for an individual account to run mod_lsapi alt-php 7.4?)

      Comment

      • bogdan.sh
        Administrator
        • Nov 2016
        • 1269

        #4
        There is no way to select ea-php from PHP Selector in user panel, it will work only for alt-php versions. What should work is to set alt-php 7.4 -> lsapi then alt-php 8.3 -> cgi.

        Comment

        • oceanwave
          Member
          Forum Explorer
          • Dec 2024
          • 30

          #5
          Under the WHM MultiPHP Manager for each php version I'm only seeing the following three options:
          cgi
          lsapi
          none

          cgi is selected by default for each php version.

          However, whether I select cgi or lsapi for an alt-php version, php.info shows:
          Server API CGI/FastCGI

          I have the following apache modules installed under easyapache 4:

          Apache 2.4
          config
          config-runtime
          mod_bwlimited
          mod_cgid
          mod_deflate
          mod_expires
          mod_headers
          mod_hostinglimits
          mod_http2
          mod_lsapi
          mod_mpm_event
          mod_proxy
          mod_proxy_fcgi
          mod_proxy_http
          mod_proxy_wstunnel
          mod_remoteip
          mod_security2
          mod_ssl
          mod_suexec
          mod_unique_id
          mod_version
          tools

          What step have I missed?

          Comment

          • oceanwave
            Member
            Forum Explorer
            • Dec 2024
            • 30

            #6
            I selected the alt-php version using the cloudlinux php selector in the user account's cpanel.
            Under Multi-PHP Manager I do not have PHP-FPM installed and under user domain setting all accounts show inherit (the ea-php83)
            I've been using the cloudlinux php selector to select the alt php version, modules, and settings from within the individual cpanel account for years, so I have not used the WHM MultiPHP Manager much.

            Comment

            • bogdan.sh
              Administrator
              • Nov 2016
              • 1269

              #7
              Well, I see the mod_lsapi as a module, but do you have the liblsapi package? Do you have a green light in WHM > CloudLinux Manager home dashboard?

              Comment

              • oceanwave
                Member
                Forum Explorer
                • Dec 2024
                • 30

                #8
                Thanks very much,
                Originally posted by bogdan.sh
                Well, I see the mod_lsapi as a module, but do you have the liblsapi package?
                # rpm -q liblsapi
                liblsapi-1.1-86.el9.cloudlinux.x86_64

                # dnf list installed liblsapi
                This system is receiving updates from CloudLinux Network server.
                Installed Packages
                liblsapi.x86_64 1:1.1-87.el9.cloudlinux @cloudlinux-rollout-1

                # dnf list installed liblsapi-devel
                This system is receiving updates from CloudLinux Network server.
                Error: No matching Packages to list

                # apachectl -M | grep lsapi
                lsapi_module (shared)

                Originally posted by bogdan.sh
                Do you have a green light in WHM > CloudLinux Manager home dashboard?
                On the cloudlinux manager homepage (Shared Pro v.7.11.29-1), Mod_lsapi shows enabled (*) Green Dot
                LSAPI mod version 1.1-86
                LSAPI criu off
                LSAPI with connection pool off
                Criu status stopped
                Total domains 0

                PHP selector diagnostic says (Green) Success. There are 0 errors found. PHP Selector should work normally.

                I used easyapache 4 to install mod_lsapi. I did not do any command line install.

                https://cloudlinux.com/getting-start...configuration/ says that it can be installed though easyapache4 -- "Choose a predefined profile with mod_lsapi named with “+mod_lsapi” from WHM > Software > EasyApache 4." It doesn't say it will work by doing a custom easy apache 4 profile with mod_lsapi selected, but I thought that it would work (?)

                Beginner questions:
                https://cloudlinux.com/getting-start...configuration/ doesn't mention $ /usr/bin/switch_mod_lsapi --setup but https://cloudlinux.zendesk.com/hc/en...-cPanel-server which details installing via ssh (instead of?) EA4 says to run $ /usr/bin/switch_mod_lsapi --setup

                If I enabled mod_lsapi via Easy Apache 4, am I supposed to run either or both:
                # /usr/bin/switch_mod_lsapi --setup
                # /usr/bin/switch_mod_lsapi --enable-global​

                Comment

                • oceanwave
                  Member
                  Forum Explorer
                  • Dec 2024
                  • 30

                  #9
                  Sorry, corrected:
                  # rpm -q liblsapi
                  liblsapi-1.1-87.el9.cloudlinux.x86_64

                  Comment

                  • bogdan.sh
                    Administrator
                    • Nov 2016
                    • 1269

                    #10
                    There is no needs to run commands manually if you clicked button in WHM, I just checked test servers and I can select the lsapi from PHP Manager right after deployment:



                    Click image for larger version

Name:	Screenshot_20260113_133632.png
Views:	0
Size:	82.6 KB
ID:	40817

                    Where there any issues during the EasyApache provisioning? That's strange since the output you provided looks good. Could you please create a support ticket for us to check in place?

                    Comment

                    Working...