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
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

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
Comment by Sergej Pupykin (sergej) - Friday, 12 February 2021, 00:08 GMT
depends=('php7')

you should configure your web server
Comment by David Rosenstrauch (darose) - Friday, 12 February 2021, 02:06 GMT
Got same error even after installing php7.
Comment by Stefan (J4son) - Sunday, 14 February 2021, 16:11 GMT
If you have php7 and php8 installed you have to use php7-fpm for roundcube. You can do it like this:

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
Comment by David Rosenstrauch (darose) - Thursday, 25 February 2021, 17:41 GMT
FYI, another workaround is that you can keep php8 installed, but just force your web server to use php7. (This removes the need for php7-fpm.) E.g.:

$ 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
Comment by sankar (sankar) - Saturday, 27 February 2021, 04:52 GMT
This shows up since RoundCube v 1.4.... is not fully tested/compliant with PHP 8. One solution could be to get PHP 7.x somehow working on our system and appease RoundCube.

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.
Comment by AMM (amish) - Sunday, 24 October 2021, 04:40 GMT
This bug may be closed now as roundcubemail now supports PHP 8.

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

Loading...