Build PHP 7.2.8 from scratch for Openlitespeed

In OLS you can run several php versions at the same time for each individual virtual host.

To use PHP of specific version you first have to build it. 

To build php 7.2.8 first you have to install all libraries needed for successful build

  • libxml2-devel
  • openssl-devel
  • libcurl-devel
  • libpng
 sudo yum install libxml2-devel openssl-devel curl-devel libpng*

After this installs you can build your php through OLS webAdmin interface.

LiteSpeed webAdmin interface

First you have to choose PHP version, then compiler options and parameters – default values are supplied and for “normal” build there is no need to change them. 

OLS admin interface will download the selected version of php LSAPI and extract it, but you will have to manually trigger the build and installation procedure.

/usr/local/lsws/phpbuild/buildphp_manual_run.sh

After build and installation procedure finishes – it takes several minutes – you can perform test of the build. Position your self in build dir and run

make test

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.