Can't run occ: "This version of Nextcloud is not compatible with PHP>=8.5"

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 32.0.6 (Nextcloud Pi 1.56.0)
  • Operating system and version (e.g., Ubuntu 24.04):
    • Armbian 25.11.2 bookworm
  • Web server and version (e.g, Apache 2.4.25):
    • Apache/2.4.66 (Debian)
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • I don't know
  • PHP version (e.g, 8.3):
    • 8.5.3
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • a few days ago, possibly after installing Memories
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Nextcloud Pi (1.56.0)
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Starting a few days ago, when I try to run occ in the terminal I get:

This version of Nextcloud is not compatible with PHP>=8.5.
You are currently running 8.5.3.

In support documents I see similar errors for earlier versions, but not for 8.5.

I wonder whether downgrading PHP is the right answer, but am only an intermediate-level sysadmin and am nervous about what it might break. If this is the solution, I’d appreciate a link to a recommended how-to.

Additionally, I notice two new errors on the System Info page of the admin interface (:4443):

Nextcloud check: error

HPB service: down

Further, the Administration Settings page of an admin user shows the following new error:

[x] Cron last run

Last background job execution ran 3 days ago. Something seems wrong.

I recently installed the Memories app and noticed the problems shortly after.

Steps to replicate it (hint: details matter!):

  1. Attempt to run occ

  2. Get the “This version of Nextcloud is not compatible with PHP>=8.5.” error.

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

I don't see any that seem relevant. There's a newish "Exception
HMAC does not match." error -- I can paste it if anyone think it matters.

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

Not possible: There's no web UI for this error.

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

I don't see anything relevant.

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => 'DELETED',
  'secret' => 'DELETED',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    7 => 'nextcloudpi',
    5 => 'nextcloudpi.local',
    8 => 'nextcloudpi.lan',
    3 => 'tgeller.mooo.com',
    11 => 'DELETED',
    1 => '192.168.178.165',
    21 => 'nc.tgeller.com',
    14 => 'nextcloudpi',
    2 => 'tgeller.mooo.com',
    12 => '[2001:1c00:571f:2d00:b02d:2215:fada:eae4]',
  ),
  'datadirectory' => '/media/myCloudDrive/ncdata/data',
  'dbtype' => 'mysql',
  'version' => '32.0.6.1',
  'overwrite.cli.url' => 'DELETED',
  'dbname' => 'DELETED',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'DELETED',
  'dbpassword' => 'DELETED',
  'installed' => true,
  'instanceid' => 'DELETED',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => 'DELETED',
  ),
  'tempdirectory' => '/media/myCloudDrive/ncdata/data/tmp',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'preview_max_x' => 2048,
  'preview_max_y' => 2048,
  'jpeg_quality' => 60,
  'overwriteprotocol' => 'https',
  'maintenance' => false,
  'logfile' => '/media/myCloudDrive/ncdata/data/nextcloud.log',
  'trusted_proxies' =>
  array (
    11 => '127.0.0.1',
    12 => '::1',
    14 => 'DELETED',
  ),
  'loglevel' => '2',
  'log_type' => 'file',
  'maintenance_window_start' => 3,
  'default_phone_region' => 'nl',
  'mail_sendmailmode' => 'smtp',
  'mail_smtphost' => 'DELETED',
  'mail_smtpport' => '465',
  'mail_smtpauth' => true,
  'mail_smtpname' => 'DELETED',
  'mail_smtppassword' => 'DELETED',
  'mail_stmtptimeout' => 30,
  'forbidden_filename_characters' =>
  array (
    0 => '\\',
    1 => '/',
  ),
  'forbidden_filename_extensions' =>
  array (
    0 => '.filepart',
    1 => '.part',
  ),
  'filesystem_check_changes' => 1,
  'mail_from_address' => 'DELETED',
  'mail_domain' => 'DELETED',
  'mail_smtpsecure' => 'ssl',
  'theme' => '',
  'memories.db.triggers.fcu' => true,
  'memories.exiftool' => '/var/www/nextcloud/apps/memories/bin-ext/exiftool-aarch64-glibc',
  'memories.vod.path' => '/var/www/nextcloud/apps/memories/bin-ext/go-vod-aarch64',
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\Image',
  ),
);


Apps

The output of occ app:list (if possible).

(Can’t do this, obviously. But it’s probably similar to the list given a recent support request: File access/syncing broken: "TypeError fsockopen(): Argument #2 ($port) must be of type int, string given" )

Well, v32 doesn’t support PHP 8.5 so perhaps you did something that upgraded PHP on your host?

Quite possible. What do you recommend to solve the problem? See my text above starting with, “I wonder whether downgrading PHP is the right answer…”.

Take a look here:
php-updater
and read the discussion.

Many thanks. That’s a huge thread (129 messages!) and the specific comment you linked to isn’t informative. Could you summarize?

No, it is a hint to a tool -script- that is useful to fix your problem for sure. But of course you have to read the doc and do some further investigations to get your problem fixed.

Nextcloud Version Supported PHP Versions
33 8.2, 8.3, 8.4, 8.5
32 8.1, 8.2, 8.3, 8.4
31 8.1, 8.2, 8.3, 8.4
30 8.1, 8.2, 8.3

see: Releases and PHP versions · nextcloud/server Wiki · GitHub

Many thanks! It seems my best course of action is to update to 33 (if possible).

Nextcloudpi 1.56 does not support nc v.33 yet.

Good point. Downgrading PHP to 8.4, then….

No, if you want to run nextcloudpi 1.56 “stable” you have to stick to debian bookworm, php8.3.
Take a look at the release notes
https://github.com/nextcloud/nextcloudpi/releases
Nextcloudpi is not “nc 33 ready” nowadays.

You can use my custom NextcloudPi docker stack .

It’s a Full Nextcloud Pi Docker Stack for Raspberry Pi 4 & 5 with Collabora Online server (Nextcloud Office) and Nextcloud Talk Signal. Supported with Redis Cache + Cron Jobs.

Full support for the Memories app, Talk app, and Nextcloud Office. Everything is tested and working, and very easy to set up and run using my GitHub instructions.

I hope it helps you and anyone else.

1 Like

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