Upgrading RoundCube to version 1.6.1 .... failed dependencies : PHP version 7.3 or later is required

SYSTEM INFORMATION
CentOS Linux 7.9.2009
Webmin version 2.013
Virtualmin version 7.5 Pro
Related packages RoundCube Scripts Upgrade to 1.6.1

Install Scripts RoundCube Upgrade to 1.6.1 fail:
Upgrading RoundCube to version 1.6.1 …

.. failed dependencies : PHP version 7.3 or later is required, but this virtual server is using version 5.4.16

the virtual server use php 8.1.14 in PHP Options as default. On Command Shell php -v show:
**> php -v
** PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

all Script upgrades before (Roundcube 1.6.0 for example) run without errors. Can you look at this please.

Thank you

@w.baer,

Send screenshot of “PHP Options” page for the domain.

Hello, it’s on all virtual servers

I think you need to move to FPM.

@w.baer,

Publish a file, let’s call it “phpinfo.php” to the domain with the code:

<?php echo phpinfo();?>

View the page, and tell us which version of PHP it says is running for that domain.

switched the virtualserver to FPM but the same error as before with Roundcube update

@w.baer,

Is it during the script installer?

@tpnsolutions yes see pictures



Having the same problem but it’s when I’m updating YOURLS via the install/uprade scripts panel.

… failed dependencies : PHP version 7.2 or later is required, but this virtual server is using version 5.6.40

I’ve tried php v7.2, v7.3, v7.4 & v8.1 via Server Configuration/PHP Options but get the same error.

Even when v5.6.40 is off under Server Status, the same error comes up.

I don’t use the script installer but I wonder if it’s getting the php version number from the cli version of php that is default ?
in a terminal run php -v and note the version number … if it’s below 7.2 perhaps changing the cli version of php is worth a shot
in the terminal run update-alternatives --display php this will show you which cli versions of php are installed
then run something like update-alternatives --set php /usr/bin/phpX.X
where XX is the php version you want to use
example : update-alternatives --set php /usr/bin/php7.4
or just use update-alternatives --config php
I just installed roundcube on a system that had php8.2 set as the cli version with no problem. I don’t have any versions of php older than 7.4 to test the theory but it may be worth a shot

@w.baer,

I am thinking @jimr1 point about the version coming from the “cli” version might be correct.

@staff perhaps this needs to be looked into.

The error message is self-explanatory really. Try changing PHP version on Server Configuration ⇾ PHP Options page to something higher.

This only affects PHP CLI, and has no effect to the PHP version that is used for a virtual server.

They have done that still does not work so self explanatory doesn’t work in this situation, I also didn’t know that composer worked using a web server thought it was cli

I had the same issue on 2 older machines where I had installed updated php versions from 7.4 to 8.1

Turned out that I was missing more than one module for each version to update the scripts.

Look to see if you have all the dependences in your php modules to run the script.

what i’ve done next is changed the php for bash to 7.4 with the following commands:

echo ‘pathmunge /opt/remi/php74/root/usr/bin’ > /etc/profile.d/custompath.sh
chmod +x /etc/profile.d/custompath.sh
. /etc/profile

in Terminal SSH it show now 7.4 for user and root
$ php -v
PHP 7.4.33 (cli) (built: Dec 19 2022 13:17:59) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

sudo still show PHP 5.4.16

In Virtualmin Virtualserver Terminal it show:
-sh-4.2$ php -v
PHP 7.4.33 (cli) (built: Dec 19 2022 13:17:59) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
the same in Webmin → Tools → Terminal

in Webmin → Tools → Command Shell it show:
> php -v PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

Roundcube upgrade in virtualserver still fails.

I found then Virtualmin → System Settings → Script Installers → Upgrade Scripts and from here it worked without Problems and Roundcube 1.6.1 run fine. The question now is from where the failed
upgrader retrive the php version ?

@Ilia,

I brought this to your attention after reading the thread completely. My thoughts as @jimr1 pointed out is that the script installer may be using the CLI version of PHP rather then the “virtual servers” version as @w.baer shows us he’s got PHP 8 enabled for domain, but the script installer sees PHP 5…

Unless I’m missing something, it does appear amuck based on what I’ve read.

1 Like

Peter, thank you for the nice summary.

I think I get it. I have tried to reproduce it on CentOS 7 where I have PHP 5.4 and 8.1 installed but it worked just as expected for me.

Perhaps, having a closer look into virtual server domain config (Domain ID found in Virtual Server Summary page) could shed more like on why it’s happening.

@w.baer As a work-around try to disable and then re-enable PHP for the virtual server, and make sure to shutdown Apache while doing this.

@Ilia
this is a good question as the OP now has roundcube installed

Thanks… I checked the modules against the YOURLS requirements and everything is loaded… cli version is 7.2.34
I’ll try installing it on another site and see what happens.