Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
litespeed_wiki:php:detached_mode:handlers [2018/09/20 17:49]
Lisa Clarke created
litespeed_wiki:php:detached_mode:handlers [2018/09/20 18:50] (current)
Lisa Clarke [Issues with lsphpxx]
Line 1: Line 1:
-===== ea-phpxx and alt-phpxx ​are different handlers on LSWS 5.3 while same on LSWS 5.2.x and below =====+====== Managing ​ea-phpxx and alt-phpxx ​Configuration Differences Between v5.3 and Previous Versions ======
  
-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 belowthere is no separate ​handler ​between alt-phpxx and ea-phpxx +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 earlieryou may need to make some adjustments to your handler ​configuration.
-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 onlyThen 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.+===== LSWS v5.2.x and Earlier Behavior ===== 
 +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-alt-php70 .php .php7 .phtml
-or + 
   AddType application/​x-httpd-ea-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.
  
-On LSWS 5.2.xif 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+===== LSWS v5.3 and Later Behavior ===== 
 + 
 +LiteSpeed'​s current version specifically adds ''​alt-phpxx''​ (CloudLinux PHP selector) handler suppport for cPanel and CloudLinux systemsHence''​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 
 +===== Issues with lsphpxx ===== 
 +Let's say you set all ''​lsphpxx''​ binaries ​to use ''​alt-phpxx'' ​for all handlersand then set some per-directory ​phpto use ''​ea-phpxx'' ​in ''​.htaccess'',​ like so: 
  
   AddType application/​x-httpd-ea-php54 .php .php7 .phtml   AddType application/​x-httpd-ea-php54 .php .php7 .phtml
Line 19: Line 30:
   </​FilesMatch>​   </​FilesMatch>​
  
-It works with LSWS 5.2.x but doesn't work with LSWS 5.3Why?+Let's also say the server only has ''​ea-php70''​ installed, and another ''​ea-phpXX''​ handler is not available.
  
-LSWS 5.3 treats ea-phpXX handler and alt-phpXX handler separately.  +The following:
-If the server only have ea-php70 installed and other ea-phpXX handler is not available, then+
  
   SetHandler application/​x-httpd-ea-php54   SetHandler application/​x-httpd-ea-php54
Line 28: Line 38:
   SetHandler application/​x-httpd-ea-php55   SetHandler application/​x-httpd-ea-php55
  
-will fail.+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.
  
-5.2.x treat ea-phpXX and alt-phpXX handler ​the same and handled by lsphpXX handler which pointing to alt-php binary.+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.
  
-How to fix it?+There are two ways to fix this problem.
  
-==== Method1You should use right Handler for LSWS 5.3 now ====+==== Method 1Use the Correct v5.3 Handler ​====
  
-In .htaccess, ​you should ​change:+In ''​.htaccess''​, change:
   SetHandler application/​x-httpd-ea-php54   SetHandler application/​x-httpd-ea-php54
 to  to 
   SetHandler application/​x-httpd-alt-php54   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 migrationThere is another way as the following:+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.
  
-==== Method2: Make LSWS 5.3 behaves ​as 5.2.x ====+==== Method2: Make LSWS 5.3 Behave ​as 5.2.x Did ====
  
-Instead of scanning .htaccess to fix wrong handler configuration,​ it is possible to make 5.3 behave the same as 5.2.x. +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.
-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