Issue switching php 8.3 to 8.4

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.0.18
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian 12.9 (Bookworm)
  • Web server and version (e.g, Apache 2.4.25):
    • Apache/2.4.62 (Debian)
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Apache/2.4.62 (Debian)
  • PHP version (e.g, 8.3):
    • 8.4
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • after switching php from 8.3 to 8.4
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • from scratch, following admin manual
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

Because php8.4 is considered to be supported i tried to switch. I know the recommendation to run php8.3
Switching php from 8.3 to 8.4 leads to

sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache OC\Memcache\Redis not available for local cache (Is the matching PHP module installed and enabled?)

«php8.4-redis» is installed but don’t know if enabled. Does it need a update?
Don’t know where to start investigation. Some hint would be great.
After switching back to 8.3, all working again as expected.

Part of “config.php”

'memcache.local' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
'timeout' => 0.0,
),
'REDIS_URL' => 'redis://localhost',

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

  1. set maintenance mode to on
  2. switch php from 8.3 to 8.4 (php-updater --switch-version)
  3. set maintenace mode to off

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.

PASTE HERE

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.

PASTE

Web server / Reverse Proxy

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

PASTE HERE

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!):

{
    "system": {
        "config_is_read_only": false,
        "0": "overwitehost => rpi4nc",
        "1": "overwritewebroot => \/nextcloud",
        "overwriteprotocol": "https",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "kenyoh.com",
            "paritsu.kenyoh.com",
            "192.168.1.104"
        ],
        "forwarded_for_headers": [
            "HTTP_X_FORWARDED_FOR"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "filesystem_check_changes": 0,
        "dbtype": "pgsql",
        "version": "31.0.0.18",
        "overwrite.cli.url": "https:\/\/kenyoh.com",
        "htaccess.RewriteBase": "\/",
        "check_for_working_htaccess": true,
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "5432",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": "true",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "default_language": "de_DE",
        "default_phone_region": "CH",
        "knowledgebaseenabled": true,
        "maintenance": false,
        "maintenance_window_start": "4",
        "theme": "",
        "loglevel": 0,
        "updater.release.channel": "stable",
        "activity_expire_days": 14,
        "auth.bruteforce.protection.enabled": true,
        "forbidden_filenames": [
            ".htaccess",
            "Thumbs.db",
            "thumbs.db"
        ],
        "cron_log": true,
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\Movie",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown"
        ],
        "integrity.check.disabled": false,
        "logfile": "\/var\/www\/nextcloud\/data\/nextcloud.log",
        "logtimezone": "Europe\/Berlin",
        "log_rotate_size": 104857600,
        "preview_max_x": 1024,
        "preview_max_y": 768,
        "preview_max_scale_factor": 1,
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0
        },
        "quota_include_external_storage": false,
        "share_folder": "\/Freigaben",
        "skeletondirectory": "",
        "trashbin_retention_obligation": "auto, 7",
        "DATABASE_URL": "postgres:\/\/ncadmin:mvszP80qr4F7aR2oyKM4@rpi4nc\/nextcloud?sslmode=disable",
        "DATABASE_PREFIX": "oc_",
        "REDIS_URL": "redis:\/\/localhost",
        "NEXTCLOUD_URL": "https:\/\/paritsu.kenyoh.com",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "app_install_overwrite": [
            "suspicious_login",
            "fulltextsearch",
            "fulltextsearch_elasticsearch",
            "files_fulltextsearch_tesseract",
            "files_fulltextsearch",
            "richdocumentscode_arm64",
            "occweb"
        ]
    }
}

Apps

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

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

At first it is important to know that you always have two different variants of PHP installed on your server, a WEB component and a CLI component (command line interface). Both are using their own set of configuration files, so that you have to make sure that Redis is activated correctly.

To check which modules are loaded you can run “php -m” on the command line and execute a script which contains “<?php phpinfo() ?>” via a web browser.

thx @j-ed for taking time

This is for the running php8.3 entity. But after switching to 8.4, “redis” is missing:

php -m
[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
igbinary
imagick
intl
json
ldap
libsmbclient
libxml
mbstring
openssl
pcntl
pcre
PDO
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
random
readline
redis
Reflection
session
shmop
SimpleXML
smbclient
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

My cloud runs on a RPi without any GUI. With the error when switching to 8.4 i have no access to a appropriate phpinfo because nextcloud is not coming up.

try the command phpenmod (or phpdismod) - it manages the symlink for php-mods; also look in /etc/php/8.2/mods-available/ and /etc/php/8.2/cli/conf.d/. it’s pretty self-explanatory.
(Replace php/8.2/ with your version(s), of course.)
GOOD LUCK!

Thx @j-ed and @pete.dawgg for taking time.

Redis for local caching was running very well with php8.3.
After reviewing and fixing some warnings, configurations (don’t know exactly) and running again @ernolf s php-updater, switching to php8.4 was possible. Redis running again. Issue solved.

Actually plenty of warnings about deprecated php function call showing up. I’m going to open new post.

This is probably why you’re seeing those:

        "loglevel": 0,

Set it back to the default (2/WARN) rather than (0/DEBUG)

thx @jtr

You’re right. I set back to 2.

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