MultiPHP Manager issue with Litespeed and PHP inheritance

triatic

Member
Aug 5, 2019
5
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

LucasRolff

Well-Known Member
May 27, 2013
97
54
18
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
5
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
5
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: