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 22:05]
Johathan Kagan [Compile PHP for LSWS (with LSAPI) (Archive Only)]
litespeed_wiki:php:lsapi [2018/09/17 19:52]
Michael Alegre removed
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