Error in Crontab

My Nexctloud is working fine despite the switch to PHP-8 but despite the version change via scheduled tasks nextcloud is still giving me errors.
Screen of my crontab:

*/5  *  *  *  * /var/run/php/php8.0-fpm.sock -f /var/www/cloud.jordand.fr/cron.php

because really for this cruntab thing I don’t understand.

cron is a very simple process, in only executes what is in the line.
When cron executes, it tries to run php and your system is complaining that the environment is not properly set up. The only way to fix that is to go through your Apache and NextCloud configuration to make sure that all the settings are correct. The change from PHP7.4 to PHP8.0 changed a few options that don’t get updated automatically.
-G

What are the main changes? Apart from updating the php modules?

And also apart from changing the value of the upstream php

For example, according to your screen, you are missing:

php8.0-{zip,mbstring,gd,curl}

I’m not sure what other setting are wrong on your particular system.

These modules are well installed on php 8.0

so my cruntab should look like this?

*/5  *  *  *  * php8.0 -f /var/www/cloud.jordand.fr/cron.php

that should work, this is how it looks on my system:

*/5 * * * * php -f /usr/local/www/apache24/data/cron.php

The other thing that may be happening, is if you are using APCu for memory caching?
in which case you might need to append --define apc.enable_cli=1 to your cron job:

*/5 * * * * php8.0 --define apc.enable_cli=1 -f /var/www/cloud.jordand.fr/cron.php

1 Like

I don’t know what the APCu is

But thank you very much, the crontab problem is solved, I used your command:

*/5 * * * * php8.0 -f /var/www/cloud.jordand.fr/cron.php

I thank you very much for the help you have given me.

2 Likes

Have you installed:

php-mbstring
php-gd
php-curl
php-zip

This packages install the corresponding correct php-versions if not installed.
You can search here every package name: https://packages.debian.org

Yes I have installed them