My (subscription) Neth 7.5 box notified me of a number of available updates this morning, including Nextcloud 14.0.1. With a little bit of hesitation (given a few topics showing problems with Nextcloud after updating), I took a snapshot of my VPS, then installed them. Rebooted (since a new kernel was installed), and everything looked good. Nextcloud clients were connecting, web GUI worked, etc. Great.
After a while, I checked my email, and admin has a bunch of messages from Cron Daemon with a subject of “Cron apache@neth /opt/rh/rh-php56/root/usr/bin/php -f /usr/share/nextcloud/cron.php”, with the following body text:
Installed RPMs are nextcloud-14.0.1-1 and nethserver-nextcloud-1.2.6-1. Rather than having the cronjob in /etc/cron.d, as I’d have expected (because you then have a file that can be associated with a particular version of a particular RPM), it’s directly in apache’s crontab (crontab -u apache -l shows it), and yes, it’s calling php 5.6.
I can fix it easily enough by running crontab -u apache -e and editing the command line to call PHP 7.1 instead of 5.6, but this sounds like something the RPM should have taken care of.
I don’t have any memory of manually configuring it, and I’d think the nethserver-nextcloud RPM should set up the cron job. If it isn’t done here, how else?
Yes, hopefully so. I’ve been browsing the nethserver-nextcloud repo, and now I’m a little confused, as I don’t see where the cron job is configured at all. It’s generated somewhere (isn’t it?), but no luck finding it.
That’s the file called by the cron job, which of course is part of Nextcloud. The job itself is part of the apache user’s crontab, and it’s that job that determines which version of PHP will be used. What isn’t clear is how it got there, though evidence is mounting that I did it myself at some point in the past, and have since forgotten about it–I logged into another Neth instance of mine with Nextcloud, and it’s set to the AJAX method.
Seems the system should be using the cron method–perhaps a PR is in order. Edit: created.