OpenLiteSpeed Web Server Users' Manual

Version 1.4 Rev. 1

Compile PHP

Table of Contents

Compile PHP

Extra PATH Environment Variables | Installation Path Prefix | Compiler Flags | Configure Parameters | Add-on Modules | 

Extra PATH Environment VariablesGo to top
Description: Additional PATH values that will be appended to the current PATH environment variables for build scripts.
Syntax: path values separated by ":"
Installation Path PrefixGo to top
Description: Sets the value for the "--prefix" configure option. The default installation location is under LiteSpeed Web Server's install directory.
Syntax: path
Example: /usr/local/lsws/lsphp5
Tips: LiteSpeed Web Server can use multiple PHP versions at the same time. If you are installing multiple versions, you should give them different prefixes.
Compiler FlagsGo to top
Description: Add additional compiler flags, like optimized compiler options.
Syntax: Supported flags are CFLAGS, CXXFLAGS, CPPFLAGS, LDFLAGS. Use a space to separate different flags. Use single quotes (not double quotes) for flag values.
Example: CFLAGS='-O3 -msse2 -msse3 -msse4.1 -msse4.2 -msse4 -mavx'
Configure ParametersGo to top
Description: Configure parameters for PHP build. Apache-specific parameters and "--prefix" value will be automatically removed and "--with-litespeed" will be automatically appended when you click Next Step. (Prefix can be set in the field above.) This way you can simply copy and paste the configure parameters from the phpinfo() output of an existing working PHP build.
Syntax: Space-delimited series of options (with or without double quotes)
Add-on ModulesGo to top
Description: Select the add-on modules you wish to use. If you want to use a version not listed here, you can manually update the source code. (The location of the source code is shown in a prompt at this step of the PHP build.)
Syntax: Select from checkbox