OpenLiteSpeed Users' Manual - Compile PHP
Description: OpenLiteSpeed Users' Manual - Compile PHP.

Users' Manual
Version 1.9 — Rev. 3

# Compile PHP

### Extra PATH Environment Variables

#### Description

Additional PATH values that will be appended to the current PATH environment variables for build scripts.

#### Syntax

path values separated by ":"

### Installation Path Prefix

#### 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

Information 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 Flags

#### 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 Parameters

#### 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 Modules

#### 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