Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:multiple_phps_in_control_panel_lsws [2014/04/22 15:45]
Kevin Fwu [Guidelines]
litespeed_wiki:multiple_phps_in_control_panel_lsws [2015/07/28 19:41]
Michael Alegre removed
Line 50: Line 50:
 **Notes:​** ​ **Notes:​** ​
  
-   * Refer to the [[http://​www.litespeedtech.com/​support/​wiki/​doku.php?​id=litespeed_wiki:​php:​lsapi|LSPHP Build]] and [[http://​www.litespeedtech.com/​support/​wiki/​doku.php?​id=litespeed_wiki:​php:​lsapi:​troubleshoot|LSPHP Troubleshooting Guide]] wikis for how to compile and build PHP for LSWS.+   * Refer to the [[litespeed_wiki:​php:​lsapi|LSPHP Build]] and [[litespeed_wiki:​php:​lsapi:​troubleshooting|LSPHP Troubleshooting Guide]] wikis for how to compile and build PHP for LSWS.
  
    * Use the prefix option ('​--prefix'​) to put each LSPHP build in its own folder (/​path/​to/​prefix/​bin/​lsphp).    * Use the prefix option ('​--prefix'​) to put each LSPHP build in its own folder (/​path/​to/​prefix/​bin/​lsphp).
Line 118: Line 118:
           application/​x-httpd-php54           application/​x-httpd-php54
  
-4. You and your users can now go into your files and change file suffixes so that each script goes to the proper application (and thus the proper version of PHP). You can also use directives (in httpd.conf and .htaccess files) to manipulate how the server translates suffixes into MIME types. It is these MIME types, not the actual suffixes on the file, that the server looks at when assigning scripts to script handlers. Thus the AddType, ForceType, and AddHandler directives can change which script handler a file goes to, even if the actual suffix is not changed. For example, the following in a .htaccess file would cause all .php files in that directory to be run in PHP 5.3.24 (because it would be sent to the lsphp53_1 ​external application):​+4. You and your users can now go into your files and change file suffixes so that each script goes to the proper application (and thus the proper version of PHP). You can also use directives (in httpd.conf and .htaccess files) to manipulate how the server translates suffixes into MIME types. It is these MIME types, not the actual suffixes on the file, that the server looks at when assigning scripts to script handlers. Thus the AddType, ForceType, and AddHandler directives can change which script handler a file goes to, even if the actual suffix is not changed. For example, the following in a .htaccess file would cause all .php files in that directory to be processed by PHP 5.4.14 (because it would be sent to the lsphp54 ​external application):​
             ​             ​
-          AddType application/​x-httpd-php5 php+          AddType application/​x-httpd-php54 php
  
 The directive below would also have the same effect: The directive below would also have the same effect:
  
-          AddHandler application/​x-httpd-php5 php +          AddHandler application/​x-httpd-php54 php
  
 Another way to solve the problem is to use the ForceType directive. ForceType in a .htaccess file changes all files in the directory to a single MIME-type. The following command would cause all files in this directory to be sent to the lsphp53_1 external application:​ Another way to solve the problem is to use the ForceType directive. ForceType in a .htaccess file changes all files in the directory to a single MIME-type. The following command would cause all files in this directory to be sent to the lsphp53_1 external application:​
Line 140: Line 140:
 **Notes:​** ​ **Notes:​** ​
   * Users or host provider can designate PHP versions by location or by suffix, whichever makes more sense to them.   * Users or host provider can designate PHP versions by location or by suffix, whichever makes more sense to them.
-  * With PHP suEXEC mode, many MIME types are **NOT** supported. As of 4.1.12, suEXEC-capable suffixes are: "php, php4, php5, php52, php53, phtml, php54, fastphp, php55"​. ​+  * With PHP suEXEC mode, many MIME types are **NOT** supported. As of 4.2.20, suEXEC-capable suffixes are: "php, php4, php5, php52, php53, phtml, php54, fastphp, php55, php56, and php6"​. ​