Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
litespeed_wiki:cloudlinux:php-selector-native-cpanel [2016/06/17 21:10] Jackson Zhang |
litespeed_wiki:cloudlinux:php-selector-native-cpanel [2018/09/17 17:27] (current) Michael Alegre |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How to configure CloudLinux PHP Selector native version for cPanel and LiteSpeed ====== | + | ====== Configure CloudLinux PHP Selector native version for cPanel and LiteSpeed ====== |
- | When you install CloudLinux PHP Selecor, along with CloudLinux alternative-phpxx, there is a native mode. Alternative php bianaries are installed to /opt/alt/phpxx/use/local/bin/php or lsphp, while /usr/local/bin/php or lsphp would be the native version. | + | When you install CloudLinux PHP Selector along with CloudLinux alternative-phpxx, there is a native option. Alternative PHP binaries are installed to /opt/alt/phpxx/usr/local/bin/php or /opt/alt/phpxx/usr/local/bin/lsphp, while native versions are installed to /usr/local/bin/php or /usr/local/bin/lsphp. |
- | For cpanel easy apache 3, they were normally build through easy apache. The lsphp was normally build for matching php and copied over to /usr/local/bin/lsphp. | + | For cPanel with EasyApache 3, PHP binaries are normally built through EasyApache. LSPHP is normally built for the matching PHP build and copied over to /usr/local/bin/lsphp. |
- | For cpanel easy apache 4, they were normally copied over from cpanel ea-phpxx package. For example, if a default php is 5.6, /usr/local/bin/php should be copied from /opt/cpanel/ea-php56/root/usr/bin/php, then /usr/local/bin/lsphp should be copied from /opt/cpanel/ea-php56/root/usr/bin/lsphp for matching php. | + | For cPanel with EasyApache 4, PHP binaries are normally copied over from cPanel ea-phpxx packages. For example, if the default PHP is 5.6, /usr/local/bin/php should be copied from /opt/cpanel/ea-php56/root/usr/bin/php and /usr/local/bin/lsphp should be copied from /opt/cpanel/ea-php56/root/usr/bin/lsphp. |
- | To verify if the native version works or not and which php modules enabled, simply run: | + | To confirm that the native version works and determine which PHP modules are enabled, simply run: |
/usr/local/bin/php -i | more | /usr/local/bin/php -i | more | ||
/usr/local/bin/lsphp -i | more | /usr/local/bin/lsphp -i | more | ||
- | But not done yet, you have to check if native version has been enabled for use. | + | After this, you have to check if the native version has been enabled for use. |
[~]# selectorctl --summary --show-native-version | [~]# selectorctl --summary --show-native-version | ||
Line 25: | Line 25: | ||
| | ||
There is no "e" after "native(5.4)" hence it is not enabled yet. | There is no "e" after "native(5.4)" hence it is not enabled yet. | ||
- | To enable it: | + | To enable it run: |
#/usr/bin/cl-selector --interpreter=php --set-enabled=native | #/usr/bin/cl-selector --interpreter=php --set-enabled=native | ||
- | Verify: | + | Verify again: |
selectorctl --summary --show-native-version | selectorctl --summary --show-native-version | ||
4.4 e - | 4.4 e - | ||
Line 40: | Line 40: | ||
native(5.4) e - | native(5.4) e - | ||
| | ||
- | For example, a domain was set to use native but showed error:"Your PHP installation appears to be missing the MySQL extension which is required by WordPress." It showed the same error for both Apache and LiteSpeed. | + | For example, a domain was set to use native but showed the following error:"Your PHP installation appears to be missing the MySQL extension which is required by WordPress." It showed the same error for both Apache and LiteSpeed. |
- | Check litespeed setting based on [[http://docs.cloudlinux.com/index.html?litespeed_support.html|this reference]], it seems all fine. | + | When checking your LiteSpeed settings based on [[http://docs.cloudlinux.com/index.html?litespeed_support.html|this reference]], they seem fine. |
Check the native version: | Check the native version: | ||
Line 51: | Line 51: | ||
Both showed mysql module enabled. | Both showed mysql module enabled. | ||
- | However, native version was disabled in CloudLinux PHP selector. Enabling it will clear the error. | + | However, the native version was disabled in CloudLinux PHP selector which caused the error. Enabling it will clear the error. |
- | | + |