Composer error for webmail after last upgrade

This morning I’ve noticed the following message when trying to log into Roundcube, and no interface loads.

Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 8.1.0”.

Investigating. May switch affected clients over to the other webmail temporarily.

hi try to install php 8.1 from multi php manager and check

1 Like

It needs > 8.1, so tried installing 8.2. Thought I’d already done that. However after installing it, still the same message.

Rainloop also affected, so can’t use that as an alternate.

what is the main php version set for command line ?

After I upgraded, 8.2, but composer not playing. Have rebooted server. Because I can.

It needs 8.1 or higher so it should work fine

But we don’t install Roundcube / Rainloop with composer

But it also requires 7.3 and not 8.1

Understood. I remember when you guys switched over to direct install of the webmail interfaces. I don’t know where composer came from either!

can you provide some screenshots of the error ?

There’s nothing to see on a screenshot. It’s just text as pasted above.
I’ve put a phpinfo file in the /var/lib/roundcube directory and that tells me roundcube is running on PHP 7.4. So that seems to be the problem. Will look around to see where roundcube sets the php version.
All other websites listed in the admin settings → webserver area are runing on 8.0+

you didn’t answered what is the main php version set for command line : php -v

I did answer. 8.2

try this :

update-alternatives --set php /usr/bin/php8.1


update-alternatives --set php /usr/bin/php7.4

you can also do it from hestia cp settings :

OK, so I had another look at this. First off, its only on one Hestia server I run, so probably something to do with the config of that one.
Secondly I think the PHP version available is not relevant in this case. It is strange, for sure, that roundcube is running under PHP 7.4, when hestia cp is running under 8.1. But even if it was running under 7.4 it would still be greater than the 7.3 needed by roundcube.
So the real mystery is that this message has popped up at all. I can see it under roundcube, rainloop, and another app I have installed under a domain, called kimai. Previously all these were working fine. Any sites running wordpress, nextcloud, phpmyadmin, etc are unaffected.
I’ve tried removing composer from the server, and the message is still there! I’ve also tried setting platform_check to false wherever I can find it.

… but that’s not working if I set it in various composer.json files. And if I try to set it globally using the method suggested in the article I get a load of errors.
I’m a competent server admin, been doing it for years, but I really don’t know much about composer. Anyone there have any ideas?

Well without really knowing what I was doing, I grabbed the latest tar.gz file of roundcube from github, then replaced the existing composer.json, composer.lock files and vendor directory with the ones from the archive. And we’re back up and running with roundcube.
Will attempt something similar with the other broken sites.

I also have just discovered that rainloop has been replaced by snappymail. I ran the v-add-sys-snappymail script and that’s working fine.
Do I need to do anything to remove rainloop? Seems that its still an option in Hestia settings.

One remaining question, I guess … webmail seems to be running on PHP 7.4, and it should probably be bumped up to 8.2, as 7.4 is EOL.
Where is that change made?