"Internal Server Error" after upgrading PHP8.2 to version 8.2.28-0107 on Synology NAS

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.3.2
  • Operating system and version (e.g., Ubuntu 24.04):
    • DSM 7.2.2-72806 Update 3
  • Web server and version (e.g, Apache 2.4.25):
    • Apache/2.4.58
  • PHP version (e.g, 8.3):
    • 8.2
  • Is this the first time you’ve seen this error? (Yes / No):
    • Not exactly like this
  • When did this problem seem to first start?
    • After updating PHP

Summary of the issue you are facing:

After updating PHP 8.2 on my Synology NAS today to the version mentioned all of a sudden my Nextcloud Instance just throws the following error:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the webserver log.

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

  1. Update PHP 8.2 to version 8.2.28-0107
  2. Try to connect to Nextcloud

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.

{"reqId":"keqnkvrtRivYdqB8OmAr","level":3,"time":"2025-07-21T20:56:39+00:00","remoteAddr":"2a02:8071:a81:8da0:203a:7b53:640e:e5e3","user":false,"app":"webdav","method":"PROPFIND","url":"/remote.php/dav/calendars/USER/","message":"RedisException: Redis server went away","userAgent":"iOS/18.5 (22F76) dataaccessd/1.0","version":"31.0.3.2","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"RedisException: Redis server went away","Code":0,"Trace":[{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":179,"function":"check","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/volume1/web/fluffybox/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":135,"function":"check","class":"Sabre\\DAV\\Auth\\Plugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/volume1/web/fluffybox/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["beforeMethod:PROPFIND",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/volume1/web/fluffybox/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/volume1/web/fluffybox/apps/dav/lib/Server.php","line":398,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->","args":[]},{"file":"/path/to/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/path/to/nextcloud/remote.php","line":145,"args":["/path/to/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/path/to/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","Line":112,"message":"RedisException: Redis server went away","exception":{},"CustomMessage":"RedisException: Redis server went away"}}

Web server / Reverse Proxy

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

No log files available

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": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "mysynbeier.synology.me"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "31.0.3.2",
        "overwrite.cli.url": "https:\/\/mysynbeier.synology.me",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "user": "default",
            "port": "6379",
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***",
            "dbindex": 0
        },
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "DE",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "Beier"
        ],
        "twofactor_enforced_excluded_groups": [
            "admin"
        ],
        "app_install_overwrite": [
            "backup"
        ],
        "opcache.memory_consumption": 256,
        "opcache.interned_strings_buffer": 10,
        "opcache.max_accelerated_files": 100000,
        "opcache.revalidate_freq": 0,
        "opcache.save_comments": 1,
        "activity_expire_days": 30,
        "maintenance": false,
        "theme": "",
        "loglevel": 0,
        "maintenance_window_start": 1,
        "enabled_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\Krita",
            "OC\\Preview\\HEIC"
        ],
        "forbidden_filename_basenames": [
            "con",
            "prn",
            "aux",
            "nul",
            "com0",
            "com1",
            "com2",
            "com3",
            "com4",
            "com5",
            "com6",
            "com7",
            "com8",
            "com9",
            "com\u00b9",
            "com\u00b2",
            "com\u00b3",
            "lpt0",
            "lpt1",
            "lpt2",
            "lpt3",
            "lpt4",
            "lpt5",
            "lpt6",
            "lpt7",
            "lpt8",
            "lpt9",
            "lpt\u00b9",
            "lpt\u00b2",
            "lpt\u00b3"
        ],
        "forbidden_filename_characters": [
            "<",
            ">",
            ":",
            "\"",
            "|",
            "?",
            "*",
            "\\",
            "\/"
        ],
        "forbidden_filename_extensions": [
            " ",
            ".",
            ".filepart",
            ".part"
        ]
    }
}

I already looked if after the update the php-fpm.ini actually contains

[Redis]
extension = redis.so

and it does. The config of my instance also seems to be ok. Restarting my Apache didn’t help either. Even a full restart of my NAS didn’t change anything. Any ideas on how to fix my problem such that my instance is accessible again?

I got the same error.
i deleted
“redis”: {
“host”: “REMOVED SENSITIVE VALUE”,
“user”: “default”,
“port”: “6379”,
“timeout”: 0,
“password”: “REMOVED SENSITIVE VALUE”,
“dbindex”: 0
},

After this it workes.

Well, of course it will work again if you remove the configuration for the Redis server. Unfortunately, your Nextcloud will then also no longer use Redis. It would be better to find the actual cause why Nextcloud can no longer connect to the Redis server after the PHP upgrade and fix that, instead of just removing it from the config.php.

If I had to guess, I would say that the PHP redis module is no longer installed or has not been updated.

I actually checked, Redis is still installed. Would something break on a reinstall of it?

Just to be sure we’re talking about the same thing. I’m talking about the respective php module, not the Redis server itself.

Well, I checked the php-fpm.ini, there it is still present. Is there some other way to check if the extension is installed?

Unfortunately, I don’t have experience with Synology, but on the Linux distributions I know, php-fpm and php-redis are separate packages that need to be installed individually. Maybe php-redis was removed during the PHP upgrade?

Again, I’m not familiar with how Synology manages PHP packages, but if you have CLI access, you could try the php -m command, which should list all enabled PHP modules.

1 Like

There it says the redis module is installed.

So, I finally found the issue. You were kind of right, the extension was installed but it was not loaded.
For some time now (and for whatever reason) you have to add some lines to /volume1/@appstore/PHP8.2/misc/extension_list.json (replace PHP8.2 with the respective version you are using) between the entries of posix and shmop:

"redis": {
        "enable_default": true,
        "desc": "The phpredis extension provides an API for communicating with the Redis key-value store."
    },

The order of the entries inside this file is actually important! After that, you need to go to the Web Station inside your DSM Interface, go to “Script Language Settings” and edit the PHP profile that is used for the Nextcloud instance. There, under extensions, you need to enable the entry of redis and after that, Nextcloud is finally able to communicate with Redis.
The bad thing is, whenever PHP is upgraded, the entry in the extension_list.json file is removed and needs to be added again. After that, double check if the extension is enabled inside the PHP profile in the Web Station.

1 Like

Thank you for the details of your solution and I’ll keep this in my hip pocket as an alerternative …see link below for a slightly different approach that worked even after the latest synology php upgrade

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