FS#69622 - [roundcubemail] Unsupported PHP version
Attached to Project:
Community Packages
Opened by David Rosenstrauch (darose) - Thursday, 11 February 2021, 23:04 GMT
Last edited by Jonas Witschel (diabonas) - Tuesday, 02 November 2021, 10:15 GMT
Opened by David Rosenstrauch (darose) - Thursday, 11 February 2021, 23:04 GMT
Last edited by Jonas Witschel (diabonas) - Tuesday, 02 November 2021, 10:15 GMT
|
Details
Description:
After recent upgrades to roundcube (1.4.11-1) and php (8.0.2-1) roundcube now displays the following when I try to access it: "Unsupported PHP version. Required PHP >= 5.4 and < 8.0." |
This task depends upon
Closed by Jonas Witschel (diabonas)
Tuesday, 02 November 2021, 10:15 GMT
Reason for closing: Fixed
Additional comments about closing: roundcubemail 1.5.0-1
Tuesday, 02 November 2021, 10:15 GMT
Reason for closing: Fixed
Additional comments about closing: roundcubemail 1.5.0-1
you should configure your web server
Install php7-fpm and enable + start php-fpm7.service
Edit your roundcube httpd config. For me (with apache) it works like this:
<Directory "/usr/share/webapps/roundcubemail">
AllowOverride All
Options FollowSymlinks
Require all granted
php_admin_value open_basedir "/tmp/:/var/cache/roundcubemail:/usr/share/webapps/roundcubemail:/etc/webapps/roundcubemail:/usr/share/pear/:/var/log/roundcubemail"
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php-fpm7/php-fpm.sock|fcgi://localhost/"
</FilesMatch>
</Directory>
And dont forget to enable the extensions pdo_mysql and mysqli in /etc/php7/php.ini
$ grep mysql /etc/php7/php.ini | grep extension
; extension=mysqli
; extension=/path/to/extension/mysqli.so
extension=mysqli
extension=pdo_mysql
; Records communication from all extensions using mysqlnd to the specified log
$ grep php7 /etc/httpd/conf/httpd.conf
LoadModule php7_module modules/libphp7.so
Include conf/extra/php7_module.conf
Alternately we could override this check in RoundCube. That worked for me in my home server but I wouldn't risk it if this is a large scale prod server - there is a good reason why version 8 is not yet supported. But I didn't want to downgrade nor did I want to start messing elsewhere with a setup that was working otherwise -
In my installation, the offending lines are in /usr/share/webapps/roundcubemail/program/include/iniset.php
Near the top of the file we have :
if (PHP_VERSION_ID >= 80000) {
die("Unsupported PHP version. Required PHP >= 5.4 and < 8.0.");
}
Changing 80000 to 81000 should do it or for good measure, set it to 90000. Restarted php-fpm and httpd and RoundCube is back and I have a breather till RoundCube catches up with version 1.5.
PS: It still does not support PHP 8.1 though which is expected to be released in a month (November 25, 2021)
https://github.com/roundcube/roundcubemail/issues/8151