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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    101
    Likes Received:
    24
    Trophy Points:
    18
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,734
    Likes Received:
    1,706
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

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

    Thank you.
     
  3. Rodrigo Gomes

    Rodrigo Gomes Well-Known Member

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

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    618
    Likes Received:
    192
    Trophy Points:
    43
    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.
     
  5. Rodrigo Gomes

    Rodrigo Gomes Well-Known Member

    Joined:
    Apr 6, 2016
    Messages:
    101
    Likes Received:
    24
    Trophy Points:
    18
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,734
    Likes Received:
    1,706
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    #6 cPanelMichael, Dec 13, 2017
    Last edited: Dec 13, 2017
  7. Rodrigo Gomes

    Rodrigo Gomes Well-Known Member

    Joined:
    Apr 6, 2016
    Messages:
    101
    Likes Received:
    24
    Trophy Points:
    18
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,734
    Likes Received:
    1,706
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
  9. Rodrigo Gomes

    Rodrigo Gomes Well-Known Member

    Joined:
    Apr 6, 2016
    Messages:
    101
    Likes Received:
    24
    Trophy Points:
    18
    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:
    80
    Likes Received:
    3
    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:
    80
    Likes Received:
    3
    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:
    80
    Likes Received:
    3
    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:
    80
    Likes Received:
    3
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,734
    Likes Received:
    1,706
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  15. Rodrigo Gomes

    Rodrigo Gomes Well-Known Member

    Joined:
    Apr 6, 2016
    Messages:
    101
    Likes Received:
    24
    Trophy Points:
    18
    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:
    80
    Likes Received:
    3
    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.
     
Loading...

Share This Page