Nextcloud Update via command line fails

when updating from the command line (ssh but no sudo rights, just a shared host) with

php nc/updater/updater.phar

i get everytime the same output:

PHP Fatal error:  Uncaught TypeError: Return value of NC\Updater\Updater::getConfigOption() must be an instance of NC\Updater\mixed, null returned

Nextcloud version (eg, 29.0.5): 27.1.0, but also 29.0.2
PHP version (eg, 8.3): 8.3

There are mor than one instances of nextcloud. The error occurs with every version.

I would appreciate any help with this.

Thanks fpr reading.

Greetings
RogeR.

What is the output of php -v?

I suspect the PHP version of your php binary is outdated / does not match the one you’re using for the web. It’s possible there are other versions already installed in your hosting environment. They may be accessible as php80 or similar.

You’ll need to use an appropriate version that is spec’d as compatible with the involved versions of Nextcloud. For v29. For v27.

Also, please post your parsed config (occ config:list system).

1 Like

Thanks, that’s the solution!

It was PHP 7.3, with

php83 nc/updater/updater.phar

everything works fine!

The version problem will be solved on my own.

Best wishes
RogeR.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.