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:php [2013/12/03 14:41]
Michael
litespeed_wiki:php [2020/01/15 19:36] (current)
Jackson Zhang [Performance tips]
Line 1: Line 1:
-====== PHP ======+====== ​LSPHP (PHP + LSAPI) ​======
  
-~~NOTOC~~ +===== Installing ​and Configure LSPHP on LiteSpeed Web Server =====
-|[[litespeed_wiki:​how_do_i_set_up_an_external_application|How Do I Set Up an External Application?​]]|Setting up LSWS to run with dynamic content| +
-|[[litespeed_wiki:​php:​lsapi|Compile PHP 4/5 with LSAPI]]|Compiling ​and installing a custom PHP with LSAPI| +
-|[[litespeed_wiki:​php:​lsapi:​troubleshoot|Compile PHP Troubleshooting]]|A troubleshooting guide for compiling and installing a custom PHP with LSAPI| +
-|[[litespeed_wiki:​how_do_i_configure_lsws_for_php|How Do I Configure ​LSWS for PHP?]]|A step-by-step guide| +
-|[[litespeed_wiki:​php:​rpm|Installing ​LSPHP via RPM]]|The faster way to get PHP| +
-|[[litespeed_wiki:​php_lsapi:​update|Updating PHP LSAPI]]|How to update your copy of PHP LSAPI| +
-|[[litespeed_wiki:​php:​lsapi_ubuntu_debian|PHP LSAPI Ubuntu Package]]|How to create a .deb package with PHP + LSAPI for Ubuntu Dapper Drake and Edgy Eft| +
-|[[litespeed_wiki:​php_lsapi_command|LSPHP Command Line Mode]]|Good for service scalability.| +
-|[[https://​store.litespeedtech.com/​store/​knowledgebase.php?​action=displayarticle&​id=31|PHP Basic Troubleshooting Guide]]|Basic Steps to troubleshoot PHP related issues (aka 503 error) in LSWS.|+
  
-====== Add-Ons/​Extensions ======+==== Control panel environment ​==== 
 +If you use any control panel such as cPanel, Plesk or DirectAdmin , there is no extra configuration required since LSWS installation script will configure everything for you and you should be able to run PHP out of the box after installation. LSWS will use the same PHP version as Apache set on your control panel automatically. ​
  
-|[[litespeed_wiki:​php:​opcode_cache|PHP Opcode Cache: APC]]|How ​to setup proper opcode caching ​for PHP| +You can refer to the corresponding section ​for your environment ​to understand how it works for 
-|[[http://​www.litespeedtech.com/​support/​forum/​showthread.php?​t=874|PHP + Oracle]]|How ​to connect to Oracle with PHP + LSAPI| +
-|[[http://​nix101.com/​2007/​09/​22/​setting-up-a-secure-and-fast-php-build-for-litespeed|PHP5 + Suhosin Patch and Extension]]|How to build a Litespeed PHP5 LSAPI With Suhosin Patch and Extension| +
-|[[http://​wowtutorial.org/​tutorial/​3.html|PHP5 + Suhosin Patch and Extension (FreeBSD 6.2)]]|How to build a Litespeed PHP5 LSAPI With Suhosin Patch and Extension on FreeBSD 6.2| +
-|[[litespeed_wiki:​php:​uploadprogress_bar|PHP Upload Progress Bar]]|How to setup upload progress bar  ​for PHP| +
-|[[litespeed_wiki:​cl_phpselector_how_to|CloudLinux PHP Selector How-To]]|PHP Selector(CloudLinux) How-To: Install and Configurations with LSWS|+
  
-====== Configuration Tips ======+  * [[litespeed_wiki:​cpanel#​php_configuration|cPanel]] 
 +  * [[litespeed_wiki:​plesk:​php_guide|Plesk]] 
 +  * [[litespeed_wiki:​directadmin:​custombuild-installation|DirectAdmin]]  
 +   
 +If you are using CloudLinux, [[litespeed_wiki:​cloudlinux:​php-selector|PHP selector]] is the recommended way to set up PHP. 
 + 
 +==== Native (without a control panel) ==== 
 + 
 +Unlike apache or nginx using php-fpm or fastcgi, LSWS uses LSPHP, which is faster than php-fpm or fastcgi. On LSWS (native), you can install LSPHP from LiteSpeed CentOS, Ubuntu/​Debian repositories,​ then create/​configure external app and script handler to point LSWS to use the newly installed PHP binaries.  
 + 
 +Please see [[litespeed_wiki:​php:​configuring-lsws-for-php|Configuring LiteSpeed Web Server for PHP]]. 
 + 
 + 
 +===== Execution Method ===== 
 +Please see [[litespeed_wiki:​php:​which_php_setup_am_i_using|suEXEC or non-suEXEC]],​ a guide to figure out which PHP execution method you are using. 
 + 
 +===== Process Modes: ProcessGroup/​Daemon/​Worker ===== 
 + 
 +LiteSpeed Web Server offers a number of different [[litespeed_wiki:​php:​process-mode|PHP process modes]] for the various needs and goals of shared hosting providers: [[litespeed_wiki:​php:​process-mode#​processgroup_mode|ProcessGroup mode]], [[litespeed_wiki:​php:​process-mode#​daemon_mode|Daemon mode]], and [[litespeed_wiki:​php:​process-mode#​worker_mode|Worker mode]]. 
 + 
 + 
 +===== Opcode Cache ===== 
 +  * [[litespeed_wiki:​php:​opcode_cache|Opcode Caching Overview: An introduction to opcode caching, its limitations,​ and popular opcode caches]] 
 +  * [[litespeed_wiki:​php:​enable_opcode_cache|Enable opcode cache: How to enable PHP opcode cache for LiteSpeed]] 
 + 
 +===== Detached Mode ===== 
 +As of LiteSpeed Web Server version 5.3, LSPHP can be run independent of the web server in [[litespeed_wiki:​php:​detached_mode|Detached mode]]. This allows the LSPHP process, and it's opcode cache, to survive through server restarts. 
 + 
 +===== Troubleshooting ===== 
 +  * [[litespeed_wiki:​php:​execution-errors|PHP Execution Errors: Basic steps to troubleshoot PHP-related issues in LSWS.]] 
 +  * [[litespeed_wiki:​php:​503-errors|PHP 503 Errors: Basic steps to troubleshoot PHP-503-related issues in LSWS.]] 
 +  * [[litespeed_wiki:​php:​enable-php-error_log|How to Enable the PHP Error Log]] 
 +  * [[litespeed_wiki:​php:​php_info|How to Create a ''​phpinfo''​ Page]] 
 + 
 +===== Set up Multiple Versions of PHP===== 
 +  * [[litespeed_wiki:​cpanel:​easyapache4-config|Configuring cPanel + EasyApache 4 with LiteSpeed]] 
 + 
 +===== Install PHP PECL Extensions on LiteSpeed Web Server (Native) or OpenLiteSpeed ===== 
 +Check the availability of LSPHP PECL extention or build by yourself? See [[litespeed_wiki:​php:​pecl-extension|How to install pecl extention for LSPHP]]. 
 + 
 +===== Performance tips===== 
 +  * [[litespeed_wiki:​php:​improve-performance|How to improve site performance?​]] 
 +  * [[litespeed_wiki:​php:​server-load-issue|How to resolve server load issues]] 
 +  * [[litespeed_wiki:​php:​concurrency|How to control PHP concurrency (how many connections your PHP engine can serve at once)]] 
 +  * [[litespeed_wiki:​cloudlinux:​cl_LVE_vs_lsws_PHP_suEXEC_Max_Conn|Cloudlinux LVE vs. LSWS PHP suEXEC Max Conn]] 
 +  * [[litespeed_wiki:​php:​slow_log_lsapi|How to identify scripts that are slowing down your server]] 
 +  * [[litespeed_wiki:​php:​improve_initial_php_response_without_cache|How to improve initial PHP response without cache?]] 
 +===== Configuration Tips ===== 
 +  * [[litespeed_wiki:​php:​lsapi-command-line-mode|LSPHP Command Line Mode: Good for service scalability]] 
 +  * [[litespeed_wiki:​php:​lsapi-environment-variables|LSAPI Environment Variables: Further configure LSAPI setups using directives and environment variables]] 
 +  * [[litespeed_wiki:​php:​mysql-persistent-connections|Performance tip: avoid php/mysql persistent connections.]] 
 +  * [[litespeed_wiki:​php:​run-without-timeouts|Disable PHP timeouts: Make LSWS compatible with long-running processes]] 
 +  * [[litespeed_wiki:​php:​generate-source-code-with-lsapi|Use LSAPI to generate formatted PHP source code for viewing with a browser]] 
 +  * [[litespeed_wiki:​php:​fcgi-environment-variables|Supported environment variables for non-LSAPI applications]] 
 +  * [[litespeed_wiki:​php:​maxwaitq-limit|PHP Max Wait Queue Limit: Preventing the PHP wait queue from getting too long]] 
 +  * [[litespeed_wiki:​php:​disabling-modules-for-specific-accounts|How to disable a 3rd party module for a specific account]] 
 +  * [[litespeed_wiki:​php:​max-idle-time|How to control PHP max idle time]] 
 +  * [[litespeed_wiki:​php:​increase-memory|How to increase PHP Memory Limit]] 
 +  * [[litespeed_wiki:​php:​user-user.ini-with-lsphp|How to use .user.ini with LSPHP]] 
 +  * [[litespeed_wiki:​php:​per-user-php-ini|Four methods for enabling per-user php.ini]] 
 +  * [[litespeed_wiki:​php:​per-directory-php|Enabling per-directory PHP in LSWS (native)]] 
 + 
 +===== Troubleshooting ===== 
 +  * [[litespeed_wiki:​php:​why-php-error-reporting-not-working|Why PHP error reporting not working?​]] 
 +===== Add-Ons/​Extensions ===== 
 +  * [[http://​www.litespeedtech.com/​support/​forum/​showthread.php?​t=874|Connecting to Oracle with PHP + LSAPI]] 
 +  * [[litespeed_wiki:​php:​new_relic|How to get New Relic to work with LSWS]]
  
-|[[litespeed_wiki:​PHP_MYSQL_Persistent_Connections|PHP/​MySQL]]|Performance tip: avoid php/mysql persistent connections.| 
-|[[litespeed_wiki:​multiple_phps_in_control_panel_lsws|Run multiple PHPs in LiteSpeed + Control Panel]]|How to run multiple PHPs in LiteSpeed together with control panel| 
-|[[litespeed_wiki:​php_run_without_timeout|Run PHP as long as possible]]|How to Run PHP as Long as Possible| 
-|[[litespeed_wiki:​php_lsapi:​generate_source|Generate Source Code]]|Use LSAPI to generate source code for viewing with a browser| 
-|[[litespeed_wiki:​php_fcgi_environment_variables|Environment Variables for PHP FCGI Applications?​]]|Supported environment variables for non-LSAPI applications| 
-|[[litespeed_wiki:​per_user_ini_in_control_panel_lsws|Custom/​Per user php.ini in LiteSpeed + Control Panel]]|How to use custom/per user php.ini in LiteSpeed together with control panel| 
  
  • Admin
  • Last modified: 2013/12/03 14:41
  • by Michael