PHP on CloudLinux
ISPmanager 5 Business allows to set alternative PHP versions on CloudLinux in CGI and LSAPI modes. In other modes, the native PHP version is used
In order to install required PHP versions, navigate to "Web-server settings" ⇾ "PHP versions"
Applying PHP versions
CloudLinux delivers the selectorctl utility for configuration of PHP versions.
- If a control panel's user applies the PHP settings:
- the system calls selectorctl with required parameters
- If an administrator applies the PHP settings:
- changes are made into the global php.ini for the certain PHP version
- the system calls "cagefsctl --rebuild-alt-php-ini" to apply the changes
In order to set PHP as LSAPI, navigate to "Cluster settings" ⇾ "Policies" ⇾ enable "Apache Prefork"
Configuration of PHP versions with Apache mod_lsapi is set for a "certain www-domain". Different www-domains that belong to the same user, may run different PHP versions. Those versions do not depend on the version set inphpselector.
The control panel of the cluster node performs the following operations when configuring LSAPI:
- Installs lsphp:
- yum install liblsapi liblsapi-devel mod_lsapi
- /usr/bin/switch_mod_lsapi --setup
- Creates names for Apache handlers:
- creates the /etc/container/php.handler file
- the handler is described for every alternative PHP version:
- Applying user settings from phpselector to every WWW-domain regardless the selected PHP version:
- the system creates the /etc/cl.selector/symlinks.rules file:
php.d.location = selector
- and runs /usr/bin/selectorctl --apply-symlinks-rules
You can install required PHP versions in "Web-server settings" ⇾ "PHP versions"
Native PHP version is not used in LSAPI
PHP 5.6 is used by the LSAPI module and cannot be deleted
Applying settings of the WWW-domain
How to enable PHP as LSAPI for a certain WWW-domain:
- Enable "PHP as LSAPI " for the corresponding user in the user edit form. (this option is available only for users with CageFS enabled). You can choose a default PHP version for the mode.
- Enable "PHP as LSAPI" on the WWW-domain edit form, and choose a PHP version
The PHP handler is activated in the VirtualHost section of the WWW-domain's configuration file:
<FilesMatch "\.ph(p[3-5]?|tml)$"> SetHandler application/x-lsphp53 </FilesMatch>
Additional settings (as for PHP as Apache) are also specified in the configuration file of the WWW-domain.
Configuring alternative PHP versions
All the settings for PHP parameters and extensions made by the control panel, are also applied for PHP as LSAPI
We can not identify you and respond to your message.