Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
litespeed_wiki:php:lsapi [2017/03/03 21:23]
Jackson Zhang [Compile PHP for LSWS (with LSAPI) (out of date)]
litespeed_wiki:php:lsapi [2018/09/17 19:52]
Michael Alegre removed
Line 1: Line 1:
 ====== Compile PHP for LSWS (with LSAPI) (Archive Only) ====== ====== Compile PHP for LSWS (with LSAPI) (Archive Only) ======
-There is an function of "​compile PHP" (with LSAPI) ​in LiteSpeed Web Server (LSWS) Web Admin Consolewhich is pretty much a legacy function used in old ageIt can incompatible with any control panel environment ​such as cpanelplesk, DirectAdmin ​etc, or even with CloudLinux Even in a environment ​without control panel, RPMs/Packages ​have already provided most efficient way to get PHP installed ​and configured. There are not many cases for such PHP compiling ​requirement. ​ If you run into such occasional situation and do have such need, please ​take the following steps, but take them as archived/legacy information.+There is a functionality available ​in the LiteSpeed Web Server (LSWS) Web Admin console“Compile PHP”. This is a legacy function used for previous releases but that will soon be retiredThe function is incompatible with all current ​control panel environments ​such as cPanelPleskand DirectAdmin. Even in environments ​without ​control panel “Compile PHP” is obsolete. Especially with RPM and Debian ​Packages ​providing a more efficient way to install and configure ​PHP. There are even certain environments ( CloudLinux ) providing their own special packages for PHP that claim to be more secure ​and stable than that of the standard packages. There are currently ​not many use cases in which compiling ​PHP from source is required, but if one does run into such a case, please ​follow ​the following steps, but take note this is legacy information.
  
  
Line 9: Line 9:
 You can either compile PHP through LiteSpeed WebAdmin Console or from PHP source code downloaded from php.net. You can either compile PHP through LiteSpeed WebAdmin Console or from PHP source code downloaded from php.net.
  
-===== Compiling PHP through WedAdmin Console ​=====+===== Compiling PHP ===== 
 +==== Compiling PHP through WedAdmin Console ====
  
 === Access the Compile PHP utility === === Access the Compile PHP utility ===
Line 82: Line 83:
  
 {{php_compile_restart.png?​700px}} {{php_compile_restart.png?​700px}}
-===== Compiling PHP from source code =====+==== Compiling PHP from source code ====
  
 === Download PHP source code === === Download PHP source code ===
Line 128: Line 129:
   Retry Timeout : 0   Retry Timeout : 0
   Response Buffering: no   Response Buffering: no
-  ​Auto Start: yes+  Start By Server: yes
   Command: $SERVER_ROOT/​lsphp56/​bin/​lsphp   Command: $SERVER_ROOT/​lsphp56/​bin/​lsphp
   Back Log: 100   Back Log: 100
Line 143: Line 144:
 Restart LiteSpeed to make it effective. ​ Restart LiteSpeed to make it effective. ​
  
 +===== Setup PHP.ini =====
 +
 +Normally you can specify php.ini file path through '​-with-config-file-path=xxx'​ during the compiling. If not, you can verify through ​
 +  bin/lsphp -i | more 
 +  ​
 + ​Configuration File (php.ini) Path => /​usr/​local/​lsws/​lsphp56/​lib/​
 + ​Loaded Configuration File =>  /​usr/​local/​lsws/​lsphp56/​lib/​php.ini
 +
 +In general, you can copy a sample php.ini file from source code to lsphp56/lib location.
 +  cp php.ini-production lsphp56/​lib/​php.ini
 + 
 +You can run the php binary again to check if the php.ini file being loaded.
 +
 +  bin/lsphp -i | more 
 +  ​
 ===== Checking Installation ===== ===== Checking Installation =====
  
 There are a number of ways to check whether your PHP installation was successful. One of the simplest is to run the following code: There are a number of ways to check whether your PHP installation was successful. One of the simplest is to run the following code:
  
-  cd /​usr/​local/​lsws/​fcgi-bin/ + /​usr/​local/​lsws/​lsphp56/bin/lsphp -v
-  ./lsphp5 ​-v+
  
 It should return the information on your new PHP build: It should return the information on your new PHP build:
  
-  PHP 5.5.15 (litespeed) (built: Aug 20 2014 14:09:09)+  PHP 5.6.15 (litespeed) (built: Aug 20 2014 14:09:09)
   Copyright (c) 1997-2014 The PHP Group   Copyright (c) 1997-2014 The PHP Group
   Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies   Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
  • Admin
  • Last modified: 2018/09/17 19:52
  • by Michael Alegre