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 as memory usage. Backend lsphp processes stay 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 available only for CL7.
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.
- 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.
- 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 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:
Use non-native PHP with proper extensions enabled via the PHP Selector (described above). 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:
extension=/opt/alt/php56/usr/lib64/php/modules/mysqli.so extension=/opt/alt/php56/usr/lib64/php/modules/pdo_mysql.so extension=/opt/alt/php56/usr/lib64/php/modules/pdo.so
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.
- 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/apache_mod_lsapi/#installation
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 GroupZend 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/
Q: Is there any difference in using lsphp binaries from alt-php or ea-php packages with Litespeed Web Server compared to lsphp from the source?
A: In this case, there is no difference. Our binaries fully correspond to the native behavior when used with Litespeed Web Server.
Q: Is it possible to use CRIU with Litespeed Web Server?
A: Yes, Litespeed Web Server officially supports CRIU on the servers with CloudLinux. For detailed information on setting up CRIU with a Litespeed Web Server, follow the link. You can also use lsphp binaries from alt-php or ea-php packages for that purpose.
Q: Is the New Relic extension compatible with the mod_lsapi PRO?
A: Yes, it is. Currently, the New Relic PHP Agent extension is supported for alt-php version 7.0 and higher. It can be installed for alt-php with the
alt-php**-pecl-ext package (
** - version 70 and higher).
# yum install alt-php70-pecl-ext
The next step is to enable the New Relic extension on the domain. You can do this through
php.ini configuration or via PHP Selector.
We assume that the mod_lsapi PRO is already installed and enabled on the domain. If not, visit mod_lsapi PRO installation guide.
The next step is to specify the New Relic license and the name of your application on the domain. This can be easily done by adding the following lines to the main .htaccess file of a domain or the virtual host section of the Apache configuration file:
<IfModule lsapi_module> php_value newrelic.appname "My PHP Application" php_value newrelic.license "<My license key>" </IfModule>