This is an old revision of the document!


LSWS 5.3 speically adds alt-phpxx(CloudLinux PHP selector) handlers' suppport for cPanel and CloudLinux system hence alt-phpxx are different than ea-phpxx. On previous version of LSWS 5.2.x and below, there is no separate handler between alt-phpxx and ea-phpxx and both of them use ea-phpxx handlers.

The above feature will support latest cPanel multi-PHP manager more friendly since either alt-phpxx or ea-phpxx can be selected for a domain, instead of just ea-phpxx only. Then cPanel will add the following to .htaccess depending on which php was selected. LSWS 5.3 will use alt-phpxx or ea-phpxx according to user's choice. On LSWS 5.2.x and below version, LSWS will only set ea-phpxx no matter alt-phpxx or ea-phpxx selected.

AddType application/x-httpd-alt-php70 .php .php7 .phtml

or

AddType application/x-httpd-ea-php70 .php .php7 .phtml

On LSWS 5.2.x, if you set all lsphpxx binary to use alt-phpxx for all handlers and set some per directory php as the following by using ea-phpxx in .htaccess.

AddType application/x-httpd-ea-php54 .php .php7 .phtml

or

<FilesMatch ".(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-httpd-ea-php54
</FilesMatch>

It works with LSWS 5.2.x but doesn't work with LSWS 5.3. Why?

LSWS 5.3 treats ea-phpXX handler and alt-phpXX handler separately. If the server only have ea-php70 installed and other ea-phpXX handler is not available, then

SetHandler application/x-httpd-ea-php54

or

SetHandler application/x-httpd-ea-php55

will fail.

5.2.x treat ea-phpXX and alt-phpXX handler the same and handled by lsphpXX handler which pointing to alt-php binary.

How to fix it?

Method1: You should use right Handler for LSWS 5.3 now

In .htaccess, you should change:

SetHandler application/x-httpd-ea-php54

to

SetHandler application/x-httpd-alt-php54

and you should use the right one moving forward. But it seems a little time consuming to change all handler settings in all .htaccess for 5.2.x to 5.3 migration. There is another way as the following:

Method2: Make LSWS 5.3 behaves as 5.2.x

Instead of scanning .htaccess to fix wrong handler configuration, it is possible to make 5.3 behave the same as 5.2.x. Please update the name of lsphpXX external app from lsphpXX to ea-phpXX, the executable path is still pointing to alt-php binary. this way, ea-phpXX, alt-phpXX, and lsphpXX are all handled by alt-php handlers.

  • Admin
  • Last modified: 2018/09/20 17:49
  • by Lisa Clarke