The PHP handlers are configured differently in LiteSpeed Web Server v5.3 than they were in previous versions of LSWS. If you've upgraded from v.5.2.x or earlier, you may need to make some adjustments to your handler configuration.
In previous versions of LiteSpeed Web Server, there was no separate handler between alt-phpxx
and ea-phpxx
. Both used the ea-phpxx
handler, no matter which handler was actually specified.
AddType application/x-httpd-alt-php70 .php .php7 .phtml
AddType application/x-httpd-ea-php70 .php .php7 .phtml
Both of these commands resulted in the ea-php70
handler being used.
LiteSpeed's current version specifically adds alt-phpxx
(CloudLinux PHP selector) handler suppport for cPanel and CloudLinux systems. Hence, alt-phpxx
and ea-phpxx
must be treated separately.
This allows LSWS to get along better with cPanel's multi-PHP manager better, since either alt-phpxx
or ea-phpxx
can be selected for a domain now. cPanel will add the following to .htaccess
, depending on which PHP was selected, and LSWS will honor the user's choice of alt-phpxx
or ea-phpxx
:
AddType application/x-httpd-alt-php70 .php .php7 .phtml
AddType application/x-httpd-ea-php70 .php .php7 .phtml
Let's say you set all lsphpxx
binaries to use alt-phpxx
for all handlers, and then set some per-directory phpto use ea-phpxx
in .htaccess
, like so:
AddType application/x-httpd-ea-php54 .php .php7 .phtml
or
<FilesMatch ".(php4|php5|php3|php2|php|phtml)$"> SetHandler application/x-httpd-ea-php54 </FilesMatch>
Let's also say the server only has ea-php70
installed, and another ea-phpXX
handler is not available.
The following:
SetHandler application/x-httpd-ea-php54
or
SetHandler application/x-httpd-ea-php55
would work with LSWS v5.2.x and earlier, but would fail with LSWS v5.3 and later.
As mentioned, the old way is to treat ea-phpXX
and alt-phpXX
the same. They are handled by the lsphpXX
handler which points to the alt-php
binary, and all is well.
The new way is to treat the ea-phpXX
handler and alt-phpXX
handler separately, and so it fails because ea-phpXX
is not available.
There are two ways to fix this problem.
In .htaccess
, change:
SetHandler application/x-httpd-ea-php54
to
SetHandler application/x-httpd-alt-php54
This method allows you to use the correct handler moving forward, but it can be a little time consuming to change all handler settings in all .htaccess
while migrating from v5.2.x to v5.3.
Update the name of the lsphpXX
external app from lsphpXX
to ea-phpXX
. The executable path is still pointing to the alt-php
binary. This way, ea-phpXX
, alt-phpXX
, and lsphpXX
are all handled by alt-php
handlers.