Nextcloud requires PHP 7.4+

Every 5 minutes for the last 4 hours I’ve been getting an email about a cron running for Nextcloud with the error message:

This version of Nextcloud requires at least PHP 7.4.You are currently running 7.3.33. Please update your PHP version.

I have tried to install PHP 7.4 using both Cockpit and CLI and my efforts have been fruitless. It appears there is no place in Cockpit to do this, and the CLI doing a Yum search turns up zero results for any PHP 7.4 package.

The command it’s running is: /usr/bin/scl enable rh-php73 – php -d memory_limit=512M -d apc.enable_cli=1 -f /usr/share/nextcloud/cron.php

How do I get PHP 7.4 on this server, and where do I change the configuration for Nextcloud so that it recognizes PHP 7.4 and stops spamming me every 5 minutes.

Help is greatly appreciated.

Which Nextcloud version is installed?

occ --version
grep "'version'" /usr/share/nextcloud/config/config.php
rpm -q nethserver-nextcloud

Nextcloud 24.x has been released today for Nethserver, it comes with PHP 8.0, but before upgrading better to know the current version.

[17:08] [network ~] # occ --version

IOData 24.0.5

[17:08] [network ~] # grep “‘version’” /usr/share/nextcloud/config/config.php

‘version’ => ‘’,

[17:08] [network ~] # rpm -q nethserver-nextcloud


Ok. You have the latest version released today.
Maybe the cron file was manually modified at some point, and so the new rpm didn’t replace it, or there’s another reason for that.

One way to solve it could be to delete the cron file and then reinstall nextcloud (so it puts back the correct file contents):

cat /etc/cron.d/nextcloud   # show content (to check if php 7.3 is present on the file. if it is, delete the file) 
rm /etc/cron.d/nextcloud
yum reinstall nethserver-nextcloud

I can’t seem to make sense of this but it appears the issue has resolved itself some how, cat’ing the cron.d/nextcloud it now shows that it’s using PHP 8, however the emails are still continuing.

I deleted the cron file, and have reinstalled nethserver-nextcloud. I’m awaiting to see the results. Seems like maybe a stuck cronjob, which I guess means I will need to reboot the system. I hate doing that as this is a fairly heavily used email system. But I will see what happens.

Nope. The message is still continuing. Same error message. That cron must exist somewhere else.

You can check /var/log/cron to determine if the job is through CROND or something else.

Other places that can be checked:

grep -ri nextcloud /var/spool/cron
grep -ri nextcloud /etc/cron*

Apologies for the delay, this was prior to a meeting last evening, so I didn’t get to post an update until now. There were two “ghost cron files” with a .save extension and it appeared both of those were being processed every 5 minutes. Once I deleted these two files all the cron emails stopped, and it’s functioning as normal.

The files were located in /etc/cron.d/nextcloud, and were named /etc/cron.d/ and /etc/cron.d/


That sounds like nano editor autosave feature.
Glad it is solved. Regards.

1 Like