Unlike Apache's mod_php, which embeds the PHP engine inside web server processes, LiteSpeed Web Server talks to standalone PHP engine processes via LSAPI interface. You will need to install PHP either through RPMs or compiling from Source code, create a PHP external application mapping to the installed PHP Binary and set a script handler mapping to the PHP external application.

PHP Installation

Configure LSWS for PHPA step-by-step guide
Compile PHP for LSWSCompiling PHP with LSAPI through the WebAdmin console
Installing LSPHP via RPMThe fastest way to get PHP for CentOS
Installing LSPHP via APTThe fastest way to get PHP for Debian 8

PHP Mode

suEXEC or non-suEXECGuide to figure out which PHP setup you are using

Install PHP PECL Extensions

How to install pecl extention for LSPHPHow to check availability of lsphp pecl extention or build by yourself?

PHP Opcode Cache

Opcode Caching OverviewAn introduction to opcode caching, its limitations, and popular opcode caches
PHP Opcode Cache: APCHow to setup proper opcode caching for PHP


PHP 7 InstallationHow to install PHP 7 on LSWS.

PHP Troubleshooting

PHP Execution ErrorsBasic steps to troubleshoot PHP-related issues in LSWS.
PHP 503 ErrorsBasic steps to troubleshoot PHP-503-related issues in LSWS.
PHP Compilation ErrorsA troubleshooting guide for compiling and installing a custom PHP with LSAPI

CloudLinux PHP Selector

CloudLinux PHP SelectorPHP Selector(CloudLinux) How-To: Install and Configurations with LSWS

Multiple-versions PHP Setup

Running multiple PHP versions in LiteSpeed + Control PanelHow to run multiple PHP versions in LiteSpeed with a control panel
Configuring cPanel + EasyApache 4 with LiteSpeedConfiguring LiteSpeed Web Server to work with cPanel + EasyApache 4

Performance tips

PHP performanceHow to improve PHP performance
Controlling PHP ConcurrencyHow to control how many connections your PHP engine can serve at once
Understand LSWS "PHP suEXEC Max Conn" and Cloudlinux LVELSWS “PHP suEXEC Max Conn” should be always less than CL LVE EP

Configuration Tips

PHP LSAPI Ubuntu PackageHow to create a .deb package with PHP + LSAPI for Ubuntu Dapper Drake and Edgy Eft
LSPHP Command Line ModeGood for service scalability.
LSAPI Environment VariablesFurther configure LSAPI setups using directives and environment variables.
MySQL Persistent ConnectionsPerformance tip: avoid php/mysql persistent connections.
Disable PHP timeoutsMake LSWS compatible with long-running processes
Generate Source CodeUse LSAPI to generate source code for viewing with a browser
Environment Variables for PHP FCGI Applications?Supported environment variables for non-LSAPI applications
Enabling Per-User php.ini FilesFour methods for enabling per-user php.ini when
PHP Max Wait Queue LimitPreventing the PHP wait queue from getting too long
Disable 3rd party modules for specific accountsHow to disable a 3rd party module for a specific account
Control PHP max idle timeHow to control PHP max idle time
Increase PHP Memory LimitHow to increase PHP Memory Limit


PHP + OracleHow to connect to Oracle with PHP + LSAPI
PHP5 + Suhosin Patch and Extension (FreeBSD 6.2)How to build a Litespeed PHP5 LSAPI With Suhosin Patch and Extension on FreeBSD 6.2
PHP Upload Progress BarHow to setup upload progress bar for PHP
New Relic Installation GuideHow to get New Relic to work with LSWS
litespeed_wiki/php.txt · Last modified: 2016/03/28 14:42 by Michael Alegre