I m currently running NC version 22.2.3 on Ubuntu 20.04.4 LTS.
According to the “Settings > System” page, NC is using PHP7.4:
However, when I run sudo -u www-data php /var/www/nextcloud/occ upgrade from the console it says: This version of Nextcloud is not compatible with > PHP 8.0.<br/>You are currently running 8.1.3
Running php -v on the console shows:
PHP 8.1.3 (cli) (built: Feb 21 2022 14:48:42) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.3, Copyright (c) Zend Technologies
with Zend OPcache v8.1.3, Copyright (c), by Zend Technologies
However, if I try to switch php versions, sudo a2dismod php8.1 says: ERROR: Module php8.1 does not exist!
Any ideas on how to fix this or what I am doing wrong?
Enabling and disabling mods is for apache. On the command line, you are using php directly. If you have different versions on your system, you probably have something like php81 and php74 and php is just a link to the most recent version.
My main issue here (and why I used the command line in the first place) is that the updater in the NC webui does NOT work.
When I click on the “Continue update” button in the updater (Settings - Overview - Open Updater), it just jumps back to the dashboard instead of actually running the update.
That is exactly what I m trying to do.
Please let me know how that is supposed to work and I will gladly test it.
Also, I m happy to provide any relevant information required to solve the issue.
Let me know, which information / output you need (apart from the OS version, NC version, PHP verisions and the error message provided in the initial posting) and I will collect them.
Thank you for the reply.
Manually using a non-default php version would be my manual workaround at the moment (will test after next weekly backup).
However, that does not seem to solve the underlying issue of the automatic updater not working, which is very very likely caused by the php issue.
I checked out the other thread, however I dont have a .step file in my “updater” folder and the other user gets further than I do.
So this seems to be an unrelated issue, but thank you for pointing that out.
Its hard for me to believe that no one ran into the php issue yet, as I am not doing anything unusual here.
Actually the only thing I do on the OS level is the monthly “apt update && apt upgrade”.
That actually seems to have changed the PHP version.
Thank you.
For some reason, all the other guides out there, use a2dismod.
Unfortunately, this did not solve the issue of the updater jumping right back to the dashboard.
The logs (in the webui) show no error.
Any clue how to troubleshoot this?
I dug a bit deeper and found a folder called updater-ociknktswtz9 in /home/data/.
This folder indeed contained a .step as mentioned in the article from @Mageunic .
After renaming the file the updater started successfully and I was able to carry out the update using the normal occ command.
So at the moment, what I assume has happened (although I do not have proof) is that
the updater started, created the .step file, but found a non-compatible php version and failed / stopped / crashed
even after fixing php by manually setting it to PHP 7.4 again (the same version that is shown in the NC webui), the .step file still existed, which prevented the updater from running and kicked me back to the dashboard
after changing PHP to a compatible version and removing / renaming the blocking .step file, the update was successful.
So thank you @Mageunic for mentioning the other article and thank you @guddl for showing a linux noob how to switch PHP versions.