server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: error after automatic upgrade (php compatibility)

Open rponline opened this issue 1 year ago • 3 comments
trafficstars

⚠️ This issue respects the following points: ⚠️

Bug description

Hello!

I have a nextcloud running on my server
(Debian, nginx, php-fpm, mariadb)

I had auto-upgrade enabled and "suddenly" got the following error when accessing it via web:

Downgrading is not supported and is likely to cause unpredictable issues (from 29.0.1.1 to 29.0.0.19) 

I solved the issue by upgrading from PHP 8.1 to PHP 8.2.

But maybe the software should check, if the update will break the installation?

Steps to reproduce

Having php-fpm 8.1 and upgrade nextcloud to version 29.0.1.1

Expected behavior

Automatic update should not proceed since nextcloud could check that the installed php version is not compatible with the new nextcloud version. Instead a notification to the admins sould be sent

Installation method

Community Manual installation with Archive

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Nginx

Database engine version

MySQL

Configuration report

"version": "29.0.1.1",
"maintenance_window_start": 3,

rponline avatar May 24 '24 06:05 rponline

I'm actually not sure if it's a bug or a feature request :))

It takes a lot of effort to test versions on different environments, create and maintain compatibility lists.

Using a boxed solution (docker?) packaging the right dependencies would be the brutal but kinda easy way to overcome this issue.

So even if this will be a wontfix, maybe this issue helps people solving the error on their installation.

rponline avatar May 24 '24 06:05 rponline

Small bugfix suggestion:
The error output is in any case misleading.

The database and the installation files were on the level.
It was not about downgrading.

Maybe it's possible to catch this case and output a matching error?

rponline avatar May 24 '24 07:05 rponline

  • 29.0.1.1 is compatible with PHP 8.1
  • Unclear to me what "Auto upgrade" should be
  • Did you configure opcache to never expire files? That would explain the wrong version number.

kesselb avatar May 24 '24 13:05 kesselb

I solved the issue by upgrading from PHP 8.1 to PHP 8.2. But maybe the software should check, if the update will break the installation?

My guess is what fixed this wasn't the PHP update you did, but the restarting of mod_php/fpm inherent in doing so.

Likely the /version.php file from your old installation was cached as @kesselb noted.

It's quite common to need to restart PHP after major changes, but the specific needs depend on local environment's PHP settings for validation/re-validation, particularly if you've changed them from the defaults:

  • https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache
  • https://www.php.net/manual/en/opcache.configuration.php

A couple reports like this came up on the help forum too.

P.S. You won't even be offered the option to upgrade via the Updater if your environment doesn't meet the new Nextcloud Server version's PHP version requirements. So we do check this and run integration tests against all supported PHP versions. :)

joshtrichards avatar May 24 '24 16:05 joshtrichards

Out of curiosity what are your PHP config values for:

opcache.validate_timestamps opcache.revalidate_freq

Are they non-default?

joshtrichards avatar May 27 '24 22:05 joshtrichards

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

nextcloud-command avatar Jun 27 '24 00:06 nextcloud-command