ISP Config switch between php for Roundcube
In case, the server has the default version of php 5.6, but Roundcube Webmail 1.6.6 requires something higher php 7.3
Then we must install additional php, e.g. php 8.1
yum-config-manager –disable ‘remi-php*’
yum-config-manager –enable remi-safe
yum -y install php81
yum install php81-php-{cli,fpm,mysqlnd,zip,devel,gd,mbstring,curl,xml,pear,bcmath,json,soap,intl,opcache,pcntl,sockets,sysvsem,sysvshm,mbregex,gd,openssl,Kerberos,zlib,calendar,bz2,webp,jpeg,enchant,pspell,sqlite3,tidy,xsl,common,readline,xml,freetype,exif,ftp,gettext,mhash,imap,imap-ssl,pcntl,mysqli}
php81 --version
php81 --modules
systemctl restart php81-php-fpm
systemctl status php81-php-fpm
PHP Name - PHP 8.1.16
Path to the PHP FastCGI binary: /opt/remi/php81/root/usr/bin/php-cgi
Path to the php.ini directory: /etc/opt/remi/php81
Path to the PHP-FPM init script: /opt/remi/php81/root/usr/sbin/php-fpm
Path to the php.ini directory: /etc/opt/remi/php81
Path to the PHP-FPM pool directory: /etc/opt/remi/php81/php-fpm.d
PHP-FPM socket directory: <empty>
nano /etc/opt/remi/php81/php-fpm.d/www.conf
listen = 127.0.0.1:8993
php_value[session.save_path] = /var/opt/remi/php81/lib/php/session
php_value[soap.wsdl_cache_dir] = /var/opt/remi/php81/lib/php/wsdlcache
;php_value[opcache.file_cache] = /var/opt/remi/php81/lib/php/opcache
Modify roundcube configuration
/etc/httpd/conf.d/roundcubemail.conf
php-fpm
<Directory /usr/share/roundcubemail/>
Options none
AllowOverride Limit
Require all granted
<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:8993"
</FilesMatch>
</Directory>
FastCGI
<Directory /usr/share/roundcubemail/> # Options none
Options +ExecCGI
AllowOverride Limit
Require all granted
FCGIWrapper /opt/remi/php81/root/usr/bin/php-cgi .php
<FilesMatch \.php$>
SetHandler fcgid-script
</FilesMatch>
</Directory>