Skip to main content

MultiPHP INI Editor is not working with mod_lsapi

Comments

27 comments

  • cPanelMichael
    Hello, Could you verify which version of PHP is enabled for the account in "cPanel >> MultiPHP Manager"? Thank you.
    0
  • Rodrigo Gomes
    Hello, Could you verify which version of PHP is enabled for the account in "cPanel >> MultiPHP Manager"? Thank you.

    PHP 7.2
    0
  • rpvw
    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.
    0
  • Rodrigo Gomes
    I don't hold out much hope of anything much being done to further develop the inter-compatibility between these two solutions.

    I agree.
    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.

    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.
    0
  • cPanelMichael
    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.
    0
  • Rodrigo Gomes
    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!
    0
  • cPanelMichael
    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.
    0
  • Rodrigo Gomes
    Hello Michael, I opened a support ticket in cPanel and was informed of the following: Development teams have sent an updated reply. It seems that the MultiPHP INI Editor is not integrated with mod_lsapi. This is precisely why you may be experiencing this issue. Currently the .htaccess settings which are adjusted for PHP only apply when the PHP handler is set DSO. So if you notice these options in the .htaccess file it is to accommodate the handler being DSO. If you would like to see lsapi integrated into MultiPHP INI Editor, it was recommended that you open a new feature request.
    Then I opened a feature request: Make MultiPHP INI Editor work with mod_lsapi
    0
  • Trane Francks
    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: AddType application/x-httpd-lsphp .php lsapi_user_ini_homedir On lsapi_process_phpini On lsapi_debug Off Apparently, mod_lsapi and MultiPHP just don't jibe. Either that or I'm missing something. Please advise. trane
    0
  • Trane Francks
    SOLVED: I added this to my global Pre VirtualHost Include: 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 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.
    0
  • Trane Francks
    Adding: the .htaccess directive appears to potentially be unnecessary.
    0
  • Trane Francks
    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): lsapi_enable_user_ini On
    0
  • cPanelMichael
    Hello, I encourage anyone seeking this functionality to vote and add feedback to the existing feature request at: Make MultiPHP INI Editor work with mod_lsapi Thank you.
    0
  • Rodrigo Gomes
    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): lsapi_enable_user_ini On

    For security reasons, I do not recommend that you use this. The user can override settings in php.ini that shouldn't.
    0
  • Trane Francks
    For security reasons, I do not recommend that you use this. The user can override settings in php.ini that shouldn't.

    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.
    0
  • Benito
    Hello, I encourage anyone seeking this functionality to vote and add feedback to the existing feature request at: Make MultiPHP INI Editor work with mod_lsapi Thank you.

    Hello, the link is broken. I have the topic problem. Thanks Cristian
    0
  • cPanelMichael
    Then I opened a feature request: Make MultiPHP INI Editor work with mod_lsapi

    Hello @Rodrigo Gomes, Do you mind reopening this feature request? It looks to have been lost during the recent issue with the feature request website noted at: Feature Request Site Downtime Thank you.
    0
  • Trane Francks
    Hello, the link is broken. I have the topic problem. Thanks Cristian

    Add the following to your Pre VirtualHost Include apache configuration and everything just works: lsapi_enable_user_ini On [QUOTE="cPanelMichael">Do you mind reopening this feature request?
    I'm confused. mod_lsapi works just fine with MultiPHP INI Editor with existing mechanisms. What feature is actually missing?
    0
  • cPanelMichael
    I'm confused. mod_lsapi works just fine with MultiPHP INI Editor with existing mechanisms. What feature is actually missing?

    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.
    0
  • Trane Francks
    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.

    Fair enough. It might be easier for cPanel to ask the CloudLinux folks to enable the .user.ini directive by default on cPanel installations.
    0
  • Saxtus
    Adding the following lines in /etc/apache2/conf.d/lsapi.conf and restarting Apache did the trick for us:
    lsapi_enable_user_ini On lsapi_user_ini_homedir On
    0
  • Rodrigo Gomes
    Hello @Rodrigo Gomes, Do you mind reopening this feature request? It looks to have been lost during the recent issue with the feature request website noted at: Feature Request Site Downtime Thank you.

    Hello @cPanelMichael, I reopened the requisition, it is in moderation at this time. Thank you.
    0
  • 4u123
    Adding the following lines in /etc/apache2/conf.d/lsapi.conf and restarting Apache did the trick for us:
    lsapi_enable_user_ini On lsapi_user_ini_homedir On

    I just wanted to iterate the above. The functionality is there, but by default lsapi_enable_user_ini is set to "Off". You can tweak lsapi by using the /etc/apache2/conf.d/lsapi.conf file and there is no need to use the Apache includes. If you plan to use lsapi, which is provided by Cloudlinux, you should take the time to read their documentation here... Apache mod_lsapi I'd say that the feature request to enable this functionality is pointless, as the functionality already exists - but this does raise interesting questions about the integration between cpanel and Cloudlinux. It seems to me that cpanel were not aware of this config file and there is a distinct lack of communication between the two companies. I should also point out that the file isn't mentioned very much at all in Cloudlinux's lsapi documentation.
    0
  • Saxtus
    Also do note, that the suggested (by cPanel customer support) change:
    lsapi_phprc auto
    does the trick but create a new bunch of problems, as we had all of the server's OpenCart installations to fail with Directory doesn"t exist in uploading an image. We had to revert the above few days later and use what I've posted in my previous post.
    0
  • Rodrigo Gomes
    For security reasons, I do not recommend that you use this. The user can override settings in php.ini that shouldn't.

    I just want to remind you guys of that. If you have a shared hosting, it is not a good idea to enable this option.
    0
  • MarkCanada
    I just want to remind you guys of that. If you have a shared hosting, it is not a good idea to enable this option.

    @Rodrigo Can you please explain why? By default any other cPanel PHP handler processes the local PHP.ini. Why would it be a higher risk using that feature with lsapi than any other PHP handler?
    0
  • Rodrigo Gomes
    @Rodrigo Can you please explain why? By default any other cPanel PHP handler processes the local PHP.ini. Why would it be a higher risk using that feature with lsapi than any other PHP handler?

    Hello @MarkCanada , I'm not going to tell you here what setting specifically can compromise your shared server. I recommend you do your own tests. Based on the modules you use. I, for example, use opcache, and this configuration compromises the security of my shared server.
    0

Please sign in to leave a comment.