Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

MultiPHP INI Editor is not working with mod_lsapi

Discussion in 'CloudLinux' started by Rodrigo Gomes, Dec 9, 2017.

  1. Rodrigo Gomes

    Rodrigo Gomes Well-Known Member

    Joined:
    Apr 6, 2016
    Messages:
    124
    Likes Received:
    28
    Trophy Points:
    28
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Hello,

    I migrated to CloudLinux recently and started to use mod_isapi.

    And I noticed that the MultiPHP INI Editor does not work with this module because the Editor adds a line that checks by php7_module.

    Example:
    Code:
    # BEGIN cPanel-generated php ini directives, do not edit
    # Manual editing of this file may result in unexpected behavior.
    # To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
    # For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
    <IfModule php7_module>
       php_flag display_errors Off
    </IfModule>
    # END cPanel-generated php ini directives, do not edit
    if I remove <IfModule php7_module>, then everything works normally.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Could you verify which version of PHP is enabled for the account in "cPanel >> MultiPHP Manager"?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Rodrigo Gomes

    Rodrigo Gomes Well-Known Member

    Joined:
    Apr 6, 2016
    Messages:
    124
    Likes Received:
    28
    Trophy Points:
    28
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    PHP 7.2
     
  4. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    817
    Likes Received:
    298
    Trophy Points:
    113
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Since the all too brief love affair between cPanel and Cloudlinux seems to have degenerated into an unhappy marriage, and Cloudlinux have repeatedly stated that they will drop their implementation of PHP Selector as soon as the MultiPHPManager reaches feature parity, I don't hold out much hope of anything much being done to further develop the inter-compatibility between these two solutions.

    Personally, my customers all prefer the Cloudlinux implementation using PHP Selector |extension manager | options over the cPanel MultiPHPManager and their MultiPHP INI Editor, even though the latter potentially allows better and more flexible control over the PHP environment.

    I run mod_lsapi with lsapi set as the handler, and use alt-php and PHP Selector for all my clients, and my clients and I are delighted with the results.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Rodrigo Gomes

    Rodrigo Gomes Well-Known Member

    Joined:
    Apr 6, 2016
    Messages:
    124
    Likes Received:
    28
    Trophy Points:
    28
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    I agree.

    This depends on the type of client, on my server I like to facilitate for clients, and MultiPHP has an easier interface.

    We like the principle: less is more.
     
    cPAusaf likes this.
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Could you open a support ticket using the link in my signature so we can test this further to determine if the behavior is a bug?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #6 cPanelMichael, Dec 13, 2017
    Last edited: Dec 13, 2017
  7. Rodrigo Gomes

    Rodrigo Gomes Well-Known Member

    Joined:
    Apr 6, 2016
    Messages:
    124
    Likes Received:
    28
    Trophy Points:
    28
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Hello Michael!

    I think this is a bug. But it is not something relatively urgent, I can do the tests that you want, and put here the results!
     
  8. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    As I understand, this would be a bug with LSAPI as opposed to cPanel. Could you report this to the CloudLinux support team and let us know the ticket number?

    CloudLinux - Submit A Support Request

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Rodrigo Gomes

    Rodrigo Gomes Well-Known Member

    Joined:
    Apr 6, 2016
    Messages:
    124
    Likes Received:
    28
    Trophy Points:
    28
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Hello Michael,

    I opened a support ticket in cPanel and was informed of the following:
    Then I opened a feature request:
    Make MultiPHP INI Editor work with mod_lsapi
     
    cPanelMichael likes this.
  10. Trane Francks

    Trane Francks Well-Known Member

    Joined:
    Jun 19, 2012
    Messages:
    88
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Machida, Tokyo, Japan
    cPanel Access Level:
    Root Administrator
    Was this issue ever resolved?

    I am currently experiencing a situation where we are using CLOUDLINUX 7.4 with EA4 & mod_lsapi and MultiPHP Selector / MultiPHP INI Editor and .user.ini changes are NOT being indicated with phpinfo().

    I took one look at alt_php/PHP Selector and immediately felt that the vast majority of users would be much better served by ea-php*/MultiPHP due to the easy way of understanding/editing PHP settings in the MultiPHP INI Editor. Changes in WHM 68.0.33 do not appear to be picked up. mod_lsapi is globally enabled for all PHP versions installed (5.6.x+).

    I like the small memory footprint and performance of mod_lsapi. I added the following to Apache's pre-virtualhost configuration:

    <IfModule lsapi_module>
    AddType application/x-httpd-lsphp .php
    lsapi_user_ini_homedir On
    lsapi_process_phpini On
    lsapi_debug Off
    </IfModule>

    Apparently, mod_lsapi and MultiPHP just don't jibe. Either that or I'm missing something.

    Please advise.

    trane
     
  11. Trane Francks

    Trane Francks Well-Known Member

    Joined:
    Jun 19, 2012
    Messages:
    88
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Machida, Tokyo, Japan
    cPanel Access Level:
    Root Administrator
    SOLVED:

    I added this to my global Pre VirtualHost Include:

    <IfModule lsapi_module>
    AddType application/x-httpd-lsphp .php
    lsapi_enable_user_ini On
    lsapi_user_ini_homedir On
    lsapi_process_phpini On
    lsapi_mod_php_behaviour Off
    lsapi_debug Off
    </IfModule>

    And then added this to the user .htaccess immediately above the cPanel-generated php ini directives:

    lsapi_phpini /home/USER/public_html/php.ini

    Where USER is changed to the actual name of the user account. As long as the user is informed to add the lsapi_phpini directive to .htaccess, all should work as hoped/expected.
     
  12. Trane Francks

    Trane Francks Well-Known Member

    Joined:
    Jun 19, 2012
    Messages:
    88
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Machida, Tokyo, Japan
    cPanel Access Level:
    Root Administrator
    Adding: the .htaccess directive appears to potentially be unnecessary.
     
  13. Trane Francks

    Trane Francks Well-Known Member

    Joined:
    Jun 19, 2012
    Messages:
    88
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Machida, Tokyo, Japan
    cPanel Access Level:
    Root Administrator
    FINAL CLARIFICATION:

    The only entry that seems necessary in Pre VirtualHost Include to make .user.ini files read by mod_lsapi is below (no .htaccess directives required):

    <IfModule lsapi_module>
    lsapi_enable_user_ini On
    </IfModule>
     
    cPanelMichael likes this.
  14. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. Rodrigo Gomes

    Rodrigo Gomes Well-Known Member

    Joined:
    Apr 6, 2016
    Messages:
    124
    Likes Received:
    28
    Trophy Points:
    28
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    For security reasons, I do not recommend that you use this.
    The user can override settings in php.ini that shouldn't.
     
  16. Trane Francks

    Trane Francks Well-Known Member

    Joined:
    Jun 19, 2012
    Messages:
    88
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Machida, Tokyo, Japan
    cPanel Access Level:
    Root Administrator
    MultiPHP INI Editor creates the .user.ini file and is the mechanism by which PHP-FPM is supported. If you change any PHP settings with that editor, it creates BOTH a local php.ini AND the .user.ini. By adding the lsapi_enable_user_ini pre virtualhost include directive, your INI file is read.

    In other words, MultiPHP INI Editor and mod_lsapi already work together.
     
  17. benito

    benito Well-Known Member

    Joined:
    Jan 8, 2004
    Messages:
    322
    Likes Received:
    4
    Trophy Points:
    168
    Location:
    Mar del Plata - Argentina
    Hello, the link is broken. I have the topic problem.

    Thanks
    Cristian
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. Trane Francks

    Trane Francks Well-Known Member

    Joined:
    Jun 19, 2012
    Messages:
    88
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Machida, Tokyo, Japan
    cPanel Access Level:
    Root Administrator
    Add the following to your Pre VirtualHost Include apache configuration and everything just works:

    <IfModule lsapi_module>
    lsapi_enable_user_ini On
    </IfModule>


    I'm confused. mod_lsapi works just fine with MultiPHP INI Editor with existing mechanisms. What feature is actually missing?
     
  20. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @Trane Francks,

    It doesn't work out of the box unless a manual workaround is implemented. The idea behind the feature request would be for the MultiPHP INI Editor to automatically detect that LiteSpeed is enabled and to make the appropriate changes.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice