Issue
During usage of different PHP versions per domain/folder feature, selected PHP modules of that version are missing, e.g.:
.htaccess:
<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-httpd-alt-php80___lsphp
</FilesMatch>
PHP Selector:
However, the configured modules in the PHP Selector for PHP 8 are not used.
Environment
- Any CloudLinux version
- cPanel
Solution
1. The PHP modules availability for PHP version per directory is controlled by the /etc/cl.selector/symlinks.rules file, it has to be created according to the https://docs.cloudlinux.com/cloudlinux_os_components/#php-extensions
2. If that was done but you still have no success and selected modules are not used, please check the file permissions. The /etc/cl.selector/symlinks.rules file can be created manually, and as different servers can have different umask value, a file can be created with incorrect permissions.
3. For example:
[root@server1 ~]# ll /etc/cl.selector/symlinks.rules
-rw-------1 root root 26 Feb 10 14:48 /etc/cl.selector/symlinks.rules
to fix the issue, please apply the correct permissions:
[root@server1 ~]# chmod 0644 /etc/cl.selector/symlinks.rules
[root@server1 ~]# ll /etc/cl.selector/symlinks.rules
-rw-r--r-- 1 root root 26 Feb 10 14:48 /etc/cl.selector/symlinks.rules
and apply symlinks rules:
[root@server1 ~]# selectorctl --apply-symlinks-rules|grep testuser
Processing user testuser
Cause
Missing /etc/cl.selector/symlinks.rules file or incorrect file permission.
Useful links
- geek-university.com/linux/set-the-default-permissions-for-newly-created-files
- https://docs.cloudlinux.com/cloudlinux_os_components/#php-extensions
Comments
0 comments
Please sign in to leave a comment.