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

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


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

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.
Running multiple PHP versions in LiteSpeed + Control PanelHow to run multiple PHP versions in LiteSpeed with a control panel
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
Controlling PHP ConcurrencyHow to control how many connections your PHP engine can serve at once
PHP Max Wait Queue LimitPreventing the PHP wait queue from getting too long
PHP performanceHow to improve PHP performance
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
How to install pecl extention for LSPHPHow to check availability of lsphp pecl extention or build by yourself?
litespeed_wiki/php.txt · Last modified: 2015/11/17 16:19 by Michael Alegre