Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
litespeed_wiki:php:lsapi [2017/03/03 21:48] Johathan Kagan [Compile PHP for LSWS (with LSAPI) (Archive Only)] |
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 almost retired function in LiteSpeed Web Server (LSWS) Web Admin console, “Compile PHP”. This is a legacy function used for previous releases but has since become obsolete. The function is incompatible with all current control panel environments such as cPanel, Plesk, and DirectAdmin. Even in environments without a control panel “Compile PHP” is obsolete. 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 is required, but if one does run into such a case, please follow the following steps but take note this is 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 retired. The function is incompatible with all current control panel environments such as cPanel, Plesk, and DirectAdmin. Even in environments without a 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 |