The Basics
- Nextcloud Server version:
- 24.0.0
- Operating system and version:
- Debian 12.8
- Web server and version:
- Apache 2.4.62-1~deb12u2
- Reverse proxy and version:
- N/A
- PHP version:
- 8.2.26
- Is this the first time you’ve seen this error?:
- Yes
- When did this problem seem to first start?
- Unknown
- Installation method:
- updater.phar --no-backup
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
- No
Summary of the issue you are facing:
I’ve “inherited” a NextCloud instance that seems to have been neglected in the past. The previous owner/admin is not available anymore for asking questions.
Now I’d like to make things right and upgrade to the current version. I’ve learned that it has to be done version by version. That’s fine. However, I’m already stuck at the first upgrade step from 24.0.0 to 24.0.12 because the installed PHP version is already too new. I’m a bit confused how this old version could have been installed on the incompatible PHP version 8.2.x at all.
According to apt, there a re no PHP 8.1 packages for Debian 12. I would prefer not having to temporarily downgrade PHP, especially with unofficial packages or from “alternative” package sources.
So, I need to find a way to either
- force the update on a too new PHP version
- let PHP report a different version than the installed one
Any ideas?
Steps to replicate it (hint: details matter!):
- sudo -u www-data php /var/www/html/nextcloud/updater/updater.phar --no-backup
Then I get this error message:
This version of Nextcloud is not compatible with PHP>=8.2.
You are currently running 8.2.26.
Log entries
N/A
Nextcloud
config.php:
<?php
$CONFIG = array (
'instanceid' => 'xxx',
'passwordsalt' => 'xxx',
'secret' => 'xxx',
'trusted_domains' =>
array (
0 => 'xxx',
),
'overwritehost' => 'xxx',
'overwriteprotocol' => 'https',
'datadirectory' => '/var/ncdata',
'dbtype' => 'mysql',
'version' => '24.0.0.12',
'overwrite.cli.url' => 'https://nextcloud/',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'ncadmin',
'dbpassword' => 'xxx',
'installed' => true,
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'ssl',
'mail_sendmailmode' => 'smtp',
'mail_from_address' => 'nextcloud',
'mail_domain' => 'xxx',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtphost' => 'xxx',
'mail_smtpport' => '465',
'mail_smtpauth' => 1,
'mail_smtpname' => 'xxx',
'mail_smtppassword' => 'xxx',
'maintenance' => true,
);