Q: Is it compatible with EasyApache?
A: Yes, it is. EasyApache works/fully integrates with mod_lsapi.
Q: Is it compatible with PHP Selector?
Q: Are .htaccess PHP directives supported? For example, mod_php like directives?
A: Yes. mod_lsapi can read php_* and php_admin_* directives.
Q: I have httpd.conf with SuExecUserGroup options. Do I need to add mod_lsapi related options for VirtualHost?
A: No need to change httpd.conf. mod_lsapi can read suPHP_UserGroup, RUidGid, SuExecUserGroup, AssignUserID parameters to determine user id under which site is running. Additionally you can use lsapi_uid_gid or lsapi_user_group as a native way to specify user / group ids.
Q: What is the difference between running mod_lsapi with lsapi_with_connection_pool mode On and Off?
A: When lsapi_with_connection_pool mode is Off, then the new backend lsphp process has to be created for each new incoming request. At least it requires mod_lsapi to connect to backend lsphp master-process and have it perform fork which leads to a slowdown.
With pool_mode enabled, mod_lsapi maintains persistent connections with backend which drastically increases performance (accelerates requests processing), but also increases the number of processes in LVE as well memory usage. Backend lsphp processes stays alive for lsapi_backend_max_idle time, or until lsapi_backend_max_reqs is reached (or Apache restarted).
Alternatively, we have another accelerating technology - CRIU, which is faster and uses less memory. But it is in Beta so far and available for CL7 only (stable version will appear in the near future).
Q: Your PHP installation appears to be missing the… How to manage native PHP with mod_lsapi under EasyApache 3?
A: There are several ways to do that.
1. Using PHP Selector.
To find PHP Selector in user’s panel choose Select PHP Version icon as follows:
From PHP Selector you can manage PHP version and choose the necessary extensions to be used by PHP. Choose proper PHP version from the drop-down and click Set as current. Mark proper checkboxes to choose extensions and click Save:
This is a simple and convenient way to configure the user's PHP.
2. Using native PHP from PHP Selector.
mod_lsapi installs alt-php56 as native by default (just copy of alt-php56):
The native version is not designed to enable or disable PHP extensions through the web interface of the PHP Selector. This can lead to missing of the proper PHP extensions for customers applications.
For example, you can get the following reply from the website that is using WordPress and native PHP:
There are two ways to solve this problem:
1.Use non-native PHP with proper extensions enabled via the PHP Selector (described above).
2.Use native PHP with properly configured .ini files (described below).
To configure native PHP, use an additional .ini file /opt/alt/php56/link/conf/default.ini:
By default it is empty. To solve the issue this way, the following strings must be added:
All available extensions for alt-php56 can be seen by running the command:
# ls /opt/alt/php56/usr/lib64/php/modules/
Note. Some extensions may conflict with each other, be careful when enabling them through the default.ini file.
3. Using switch_mod_lsapi --build-native-lsphp as native.
You can find additional notes on native PHP installation (EasyApache 3 only) on the link: https://docs.cloudlinux.com/mod_lsapi_installation.html
To see what kind of native PHP is used, use the command:
# /usr/local/bin/php -v
PHP 5.6.30 (cli) (built: Jun 13 2017 06:23:21)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
The command switch_mod_lsapi --build-native-lsphp builds the lsphp of the same version, it will be used as native via the PHP Selector, but with another .ini file to configure.
We do not recommend to use this native PHP because it does not support CRIU.
To revert alt-php56 to the native PHP, execute the following command:
# cp /opt/alt/php56/usr/bin/lsphp /usr/local/bin/