Cloudlinux+Litespeed+change php version

#1
How can I use the modules selected in PHP Selector in a directory where in .htaccess I changed the PHP version used (default version is 5.4)? For eg ZIP module. Doesn't that module appear to be loaded in PHPinfo? What am I doing wrong here? Thank you!

-.htaccess-
<IfModule mime_module>
AddType application/x-httpd-alt-php72___lsphp /opt/cloudlinux/alt-php72/root/usr/bin/lsphp .php
</IfModule>

1612984558381.png
 

NiteWave

Administrator
#2
this is not needed for litespeed:
<IfModule mime_module>
AddType application/x-httpd-alt-php72___lsphp /opt/cloudlinux/alt-php72/root/usr/bin/lsphp .php
</IfModule>
if it's required by apache, you can enclose it by
Code:
<IfModule !litespeed>
<IfModule mime_module>
AddType application/x-httpd-alt-php72___lsphp /opt/cloudlinux/alt-php72/root/usr/bin/lsphp .php
</IfModule>
</IfModule
PHP Selector should work out of box.
you can switch to apache first and check phpinfo.
if it not work with apache, you can contact cPanel or cloudlinux.
if it works with apache but not with litespeed, please continue discussion in this thread.
 
#3
It means I don't understand something well. If I have PHP version 5.4 in PHP Selector by default, how can I have PHP version 7.2 in a certain directory?
 

NiteWave

Administrator
#4
probably it's not possible for cloudlinux's alt-php, you can confirm with cloudlinux support.

but it's possible you run ea-php 7.2 in a directory by add following line in this directory's .htaccess:
AddType application/x-httpd-ea-php72 php
 
Top