HTTP 500 Error on Nextcloud Web Interface – PHP Fatal Error with PHP 8.3

Hi Everyone,

For the past two weeks, I’ve been encountering an HTTP 500 error when trying to access my Nextcloud web interface (although the mobile and desktop apps are working fine).

Unfortunately, I don’t have many logs to share, but the only relevant error I could find is:

2025/05/20 16:16:39 [error] 908794#908794: *138 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /data/www/nextcloud/index.php on line 2" while reading response header from upstream, client: *.*.*.*, server: cloud.*.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php-fpm.sock:", host: "cloud.*.fr"

I honestly have no idea how to fix this :disappointed_face: — any help would be much appreciated!

Happy to provide more information if needed to help resolve this issue.
Thanks :folded_hands:

Configuration

Versions

  • nextcloud : 31.0.4.1
  • php : 8.3.6
  • ubuntu : 24.04.4
  • nginx : 1.24.0

Nextcloud

The output of occ config:list system :

sudo -u www-data php occ config:list system
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.***.fr"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "31.0.4.1",
        "overwrite.cli.url": "https:\/\/cloud.***.fr",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "theme": "",
        "debug": true,
        "log_type": "errorlog",
        "logtimezone": "Europe\/Paris",
        "default_phone_region": "FR",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpsecure": "tls",
        "maintenance": false,
        "maintenance_window_start": 1,
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

Apps

The output of occ app:list.

Enabled:
  - activity: 4.0.0
  - admin_audit: 1.21.0
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - calendar: 5.2.1
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contacts: 7.0.6
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_antivirus: 6.0.0
  - files_downloadlimit: 4.0.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - nextcloud_announcements: 3.0.0
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - photos: 4.0.0-dev.1
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - richdocuments: 8.6.4
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - support: 3.0.0
  - survey_client: 3.0.0
  - systemtags: 1.21.1
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - twofactor_totp: 13.0.0-dev.0
  - updatenotification: 1.21.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - encryption: 2.19.0
  - files_external: 1.23.0
  - files_rightclick: 0.15.1
  - integration_twitter: 1.0.7
  - suspicious_login: 9.0.1
  - twofactor_nextcloud_notification: 5.0.0
  - user_ldap: 1.22.0

For the past two weeks, I’ve been encountering an HTTP 500 error when trying to access my Nextcloud web interface

Any idea what may have changed in your environment two weeks ago?

Are the 500 errors the ones with the request id show in at the end of the error page or are they the ones without a request id?

Are these showing up for each access attempt? (Just trying to ascertain whether these entries are related or just noise).

Depending on what’s really going on, it might be informative to check your PHP FPM logs.

Please turn off debug mode. If possible I’d also encouraging setting log_type to file (the default), at least while troubleshooting this. It’ll be easier to monitor nextcloud.log for Nextcloud matters versus web infrastructure matters.

Not sure why you’re experiencing this. Nextcloud works just fine with PHP 8.3.

Any idea what may have changed in your environment two weeks ago?

I have only done apt upgrades

Are the 500 errors the ones with the request id show in at the end of the error page or are they the ones without a request id?

I don’t see any request ID

Are these showing up for each access attempt? (Just trying to ascertain whether these entries are related or just noise).

Yes, for each access. I have always a HTTP 500 error :frowning: in the webpage (not for the app)

Depending on what’s really going on, it might be informative to check your PHP FPM logs.

PHP FPM logs are empty. The last entry I have is :

[20-May-2025 15:56:23] NOTICE: fpm is running, pid 908661
[20-May-2025 15:56:23] NOTICE: ready to handle connections
[20-May-2025 15:56:23] NOTICE: systemd monitor interval set to 10000ms

Please turn off debug mode. If possible I’d also encouraging setting log_type to file (the default), at least while troubleshooting this. It’ll be easier to monitor nextcloud.log for Nextcloud matters versus web infrastructure matters.

This is normally what I use, but for troubleshooting I increased the verbosity of the logs to try to understand what was going on…

Not sure why you’re experiencing this. Nextcloud works just fine with PHP 8.3.

Since I couldn’t find anything conclusive, I set up a new WordPress (PHP) instance — and I’m experiencing the same issue. It seems like my PHP version or configuration might be the root cause. Is there an easy way to check or validate the configuration of my PHP-FPM service?

Thanks