MultiPHP Manager issue with Litespeed and PHP inheritance

triatic

Member
Aug 5, 2019
8
1
3
UK
cPanel Access Level
Website Owner
I use MultiPHP Manager with Litespeed.

In MultiPHP Manager I have set the primary domain to PHP 7.2, and an addon domain which is two directory levels deeper is set to inherit its PHP version. In MultiPHP Manager, the addon domain reports it is inheriting PHP 7.2 from the primary domain.

However, the addon domain does not inherit the PHP version from the primary domain as MultiPHP Manager is suggesting, instead it inherits the system default PHP version of PHP 7.3. My host's support staff have identified that Litespeed only reads the .htaccess file from one level above for performance reasons.

MultiPHP Manager needs to correctly identify when Litespeed is installed and only report PHP inheritance from .htaccess files which are one directory level up. The information currently reported to the end user is incorrect if the PHP inheritance is two directory levels up or more and Litespeed is in use.
 
  • Like
Reactions: LucasRolff

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello @triatic,

Can you browse to WHM >> MultiPHP Manager and confirm if System PHP-FPM is enabled, or if PHP-FPM is enabled for the individual domains affected by the issue?

Thank you.
 

LucasRolff

Well-Known Member
Community Guide Contributor
May 27, 2013
141
85
78
cPanel Access Level
Root Administrator
Can you browse to WHM >> MultiPHP Manager and confirm if System PHP-FPM is enabled, or if PHP-FPM is enabled for the individual domains affected by the issue?
LiteSpeed won't read more than the DocumentRoot + 1 level up, so if you have a setup like this:

example.com:
document root: public_html

example.net:
document root: public_html/domains/example.net

Let's assume you have PHP 7.0 set as the system default, you change the PHP version of example.com to PHP 7.3.

According to the cPanel interface, example.net will inherit the PHP 7.3 version - however, because LiteSpeed will only look in public_html/domains/example.net and public_html/domains for the PHP version, it means that it won't see the inheritance, and thus example.net will run with PHP 7.0 and not PHP 7.3

Because LiteSpeed only looks 1 level above the document root of a domain, it gives a false signal within MultiPHP Manager that it inherits it, when in fact the addon or subdomain is located 2 levels below the main domain.
 

triatic

Member
Aug 5, 2019
8
1
3
UK
cPanel Access Level
Website Owner
Hi @cPanelMichael,

I don't have access to WHM since I am just an end user with no licence.

Anyway, @LucasRolff has summarised the issue correctly. MultiPHP Manager expects the webserver to read the .htaccess file from two levels up, but LiteSpeed doesn't. This can result in MultiPHP Manager incorrectly reporting the PHP version which is in use. MultiPHP Manager needs to be better aware of the behaviour of LiteSpeed.

However, LiteSpeed does read in /.htaccess (Home Directory) for all domains though, irrespective of their position in the directory structure, and this is useful for setting a global configuration in MultiPHP INI Editor. Unfortunately MultiPHP Manager does not utilise .htaccess in the Home Directory, if it did this would be useful for setting a global PHP inheritance in LiteSpeed.
 

triatic

Member
Aug 5, 2019
8
1
3
UK
cPanel Access Level
Website Owner
Hi @cPanelMichael ,

They have told me they have a ticket open: 13018173.

Primary domain is currently set to PHP 7.2, MultiPHP Manager is reporting all addon domains are inheriting PHP 7.2, but in fact only the primary domain is set to PHP 7.2, all other domains are inheriting the system default of PHP 7.3.

MultiPHP Manager is giving me incorrect information.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello,

To update, it looks like you were directed over to LiteSpeed's support team for additional investigation. Can you confirm if the issue was solved?

Thank you.
 

triatic

Member
Aug 5, 2019
8
1
3
UK
cPanel Access Level
Website Owner
Hi @cPanelMichael ,

I am now setting the PHP version in .htaccess in the Home Directory. This is inherited by all domains regardless of their depth, because LiteSpeed always reads the Home Directory's .htaccess.

MultiPHP Manager should now be updated to reflect any PHP handler values set in the Home Directory's .htaccess. It should also be updated to reflect the fact that Litespeed will only read the .htaccess from one directory above the current domain's directory, plus also the Home Directory.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello @triatic,

Here's a response to a similar question from one of our Technical Analysts in a support ticket:

The issue seems to be that PHP Selector in cPanel, which is part of CloudLinux, had PHP 5.4 set as the version. I had to enable PHP Selector in WHM >> Home >> Packages >> Feature Manager, login to the cPanel account for the user, set the PHP Selector value from 5.4 to native, and now the cPanel interface works properly and set it to ea-php73.

Even with PHP Selector disabled, the CloudLinux values are still set and will override if not set to native.
Can you share this with your hosting provider to see if it's helpful? If not, have them submit another ticket with us so we can take an additional look.

Thank you.
 

triatic

Member
Aug 5, 2019
8
1
3
UK
cPanel Access Level
Website Owner
Hi @cPanelMichael ,

What you have quoted seems like a separate issue. The issue I have is that MultiPHP Manager is not aware that LiteSpeed inherits .htaccess files in a different way to Apache.

I'd rather not ask my host to raise a support ticket on my behalf as I'd rather explain it to cPanel staff myself. That said, you still appear not to comprehend the issue yourself despite me and @LucasRolff having given an extensive explanation of the cause of the issue in this thread.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello @triatic,

I apologize for the confusion and for the support loop you've experienced. Bouncing from one support team to another is definitly not an efficient way to solve an issue. In this particular case, the behavior @LucasRolff described is accurate. Unfortunately, it's unclear at this stage if LiteSpeed needs to address the issue through a fix in their plugin, or if a cPanel fix/improvement to the MultiPHP Manager functionality is needed.

In ticket 13018173, we reproduced the behavior and directed your hosting provider to contact LiteSpeed directly concerning this issue (this is something we are required to do as part of an agreed support procedure). Once LiteSpeed accepts the report from your hosting provider, Litespeed can then contact us directly to determine the best approach to solve the issue. This helps to facilitate developer to developer communication on these issues.

To identify the outcome of the LiteSpeed ticket that your provider opened (so we can proceed to open a case if deemed appropriate), we need them to contact us directly via a support ticket.

Thank you.