Weird PHP errors after upgrade to latest version

Short summary:
Debian bookworm server with sury repo for php.
PHP 8.3 is active (problem also appears with php 8.1 and 8.2)
using apache2 as webserver
NC available via nginx proxy

Since the last update I am getting these errors, and I can’t find any source of problems. Currently my Nextcloud instance is available and works, but I’d like to solve these issues:

An exception occured while running the setup check: Error: [] operator not supported for strings in /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php:64 Stack trace: #0 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php(96): OCA\DAV\SetupChecks\WebdavEndpoint->getTestUrls() #1 /var/www/sites/nextcloud/apps/dav/lib/SetupChecks/WebdavEndpoint.php(67): OCA\DAV\SetupChecks\WebdavEndpoint->runRequest() #2 /var/www/sites/nextcloud/lib/private/SetupCheck/SetupCheckManager.php(51): OCA\DAV\SetupChecks\WebdavEndpoint->run() #3 /var/www/sites/nextcloud/apps/settings/lib/Controller/CheckSetupController.php(179): OC\SetupCheck\SetupCheckManager->runAll() #4 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(232): OCA\Settings\Controller\CheckSetupController->check() #5 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(138): OC\AppFramework\Http\Dispatcher->executeController() #6 /var/www/sites/nextcloud/lib/private/AppFramework/App.php(184): OC\AppFramework\Http\Dispatcher->dispatch() #7 /var/www/sites/nextcloud/lib/private/Route/Router.php(338): OC\AppFramework\App::main() #8 /var/www/sites/nextcloud/lib/base.php(1050): OC\Route\Router->match() #9 /var/www/sites/nextcloud/index.php(49): OC::handleRequest() #10 {main}
An exception occured while running the setup check: Error: [] operator not supported for strings in /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php:64 Stack trace: #0 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php(96): OCA\Settings\SetupChecks\DataDirectoryProtected->getTestUrls() #1 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/DataDirectoryProtected.php(65): OCA\Settings\SetupChecks\DataDirectoryProtected->runRequest() #2 /var/www/sites/nextcloud/lib/private/SetupCheck/SetupCheckManager.php(51): OCA\Settings\SetupChecks\DataDirectoryProtected->run() #3 /var/www/sites/nextcloud/apps/settings/lib/Controller/CheckSetupController.php(179): OC\SetupCheck\SetupCheckManager->runAll() #4 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(232): OCA\Settings\Controller\CheckSetupController->check() #5 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(138): OC\AppFramework\Http\Dispatcher->executeController() #6 /var/www/sites/nextcloud/lib/private/AppFramework/App.php(184): OC\AppFramework\Http\Dispatcher->dispatch() #7 /var/www/sites/nextcloud/lib/private/Route/Router.php(338): OC\AppFramework\App::main() #8 /var/www/sites/nextcloud/lib/base.php(1050): OC\Route\Router->match() #9 /var/www/sites/nextcloud/index.php(49): OC::handleRequest() #10 {main}
An exception occured while running the setup check: Error: [] operator not supported for strings in /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php:64 Stack trace: #0 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php(96): OCA\Settings\SetupChecks\JavaScriptSourceMaps->getTestUrls() #1 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/JavaScriptSourceMaps.php(62): OCA\Settings\SetupChecks\JavaScriptSourceMaps->runRequest() #2 /var/www/sites/nextcloud/lib/private/SetupCheck/SetupCheckManager.php(51): OCA\Settings\SetupChecks\JavaScriptSourceMaps->run() #3 /var/www/sites/nextcloud/apps/settings/lib/Controller/CheckSetupController.php(179): OC\SetupCheck\SetupCheckManager->runAll() #4 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(232): OCA\Settings\Controller\CheckSetupController->check() #5 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(138): OC\AppFramework\Http\Dispatcher->executeController() #6 /var/www/sites/nextcloud/lib/private/AppFramework/App.php(184): OC\AppFramework\Http\Dispatcher->dispatch() #7 /var/www/sites/nextcloud/lib/private/Route/Router.php(338): OC\AppFramework\App::main() #8 /var/www/sites/nextcloud/lib/base.php(1050): OC\Route\Router->match() #9 /var/www/sites/nextcloud/index.php(49): OC::handleRequest() #10 {main}
An exception occured while running the setup check: Error: [] operator not supported for strings in /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php:64 Stack trace: #0 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php(96): OCA\Settings\SetupChecks\JavaScriptModules->getTestUrls() #1 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/JavaScriptModules.php(63): OCA\Settings\SetupChecks\JavaScriptModules->runRequest() #2 /var/www/sites/nextcloud/lib/private/SetupCheck/SetupCheckManager.php(51): OCA\Settings\SetupChecks\JavaScriptModules->run() #3 /var/www/sites/nextcloud/apps/settings/lib/Controller/CheckSetupController.php(179): OC\SetupCheck\SetupCheckManager->runAll() #4 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(232): OCA\Settings\Controller\CheckSetupController->check() #5 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(138): OC\AppFramework\Http\Dispatcher->executeController() #6 /var/www/sites/nextcloud/lib/private/AppFramework/App.php(184): OC\AppFramework\Http\Dispatcher->dispatch() #7 /var/www/sites/nextcloud/lib/private/Route/Router.php(338): OC\AppFramework\App::main() #8 /var/www/sites/nextcloud/lib/base.php(1050): OC\Route\Router->match() #9 /var/www/sites/nextcloud/index.php(49): OC::handleRequest() #10 {main}
An exception occured while running the setup check: Error: [] operator not supported for strings in /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php:64 Stack trace: #0 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php(96): OCA\Settings\SetupChecks\OcxProviders->getTestUrls() #1 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/OcxProviders.php(71): OCA\Settings\SetupChecks\OcxProviders->runRequest() #2 /var/www/sites/nextcloud/lib/private/SetupCheck/SetupCheckManager.php(51): OCA\Settings\SetupChecks\OcxProviders->run() #3 /var/www/sites/nextcloud/apps/settings/lib/Controller/CheckSetupController.php(179): OC\SetupCheck\SetupCheckManager->runAll() #4 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(232): OCA\Settings\Controller\CheckSetupController->check() #5 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(138): OC\AppFramework\Http\Dispatcher->executeController() #6 /var/www/sites/nextcloud/lib/private/AppFramework/App.php(184): OC\AppFramework\Http\Dispatcher->dispatch() #7 /var/www/sites/nextcloud/lib/private/Route/Router.php(338): OC\AppFramework\App::main() #8 /var/www/sites/nextcloud/lib/base.php(1050): OC\Route\Router->match() #9 /var/www/sites/nextcloud/index.php(49): OC::handleRequest() #10 {main}
An exception occured while running the setup check: Error: [] operator not supported for strings in /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php:64 Stack trace: #0 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php(96): OCA\Settings\SetupChecks\WellKnownUrls->getTestUrls() #1 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/WellKnownUrls.php(73): OCA\Settings\SetupChecks\WellKnownUrls->runRequest() #2 /var/www/sites/nextcloud/lib/private/SetupCheck/SetupCheckManager.php(51): OCA\Settings\SetupChecks\WellKnownUrls->run() #3 /var/www/sites/nextcloud/apps/settings/lib/Controller/CheckSetupController.php(179): OC\SetupCheck\SetupCheckManager->runAll() #4 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(232): OCA\Settings\Controller\CheckSetupController->check() #5 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(138): OC\AppFramework\Http\Dispatcher->executeController() #6 /var/www/sites/nextcloud/lib/private/AppFramework/App.php(184): OC\AppFramework\Http\Dispatcher->dispatch() #7 /var/www/sites/nextcloud/lib/private/Route/Router.php(338): OC\AppFramework\App::main() #8 /var/www/sites/nextcloud/lib/base.php(1050): OC\Route\Router->match() #9 /var/www/sites/nextcloud/index.php(49): OC::handleRequest() #10 {main}
An exception occured while running the setup check: Error: [] operator not supported for strings in /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php:64 Stack trace: #0 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php(96): OCA\Settings\SetupChecks\Woff2Loading->getTestUrls() #1 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/Woff2Loading.php(63): OCA\Settings\SetupChecks\Woff2Loading->runRequest() #2 /var/www/sites/nextcloud/lib/private/SetupCheck/SetupCheckManager.php(51): OCA\Settings\SetupChecks\Woff2Loading->run() #3 /var/www/sites/nextcloud/apps/settings/lib/Controller/CheckSetupController.php(179): OC\SetupCheck\SetupCheckManager->runAll() #4 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(232): OCA\Settings\Controller\CheckSetupController->check() #5 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(138): OC\AppFramework\Http\Dispatcher->executeController() #6 /var/www/sites/nextcloud/lib/private/AppFramework/App.php(184): OC\AppFramework\Http\Dispatcher->dispatch() #7 /var/www/sites/nextcloud/lib/private/Route/Router.php(338): OC\AppFramework\App::main() #8 /var/www/sites/nextcloud/lib/base.php(1050): OC\Route\Router->match() #9 /var/www/sites/nextcloud/index.php(49): OC::handleRequest() #10 {main}
An exception occured while running the setup check: Error: [] operator not supported for strings in /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php:64 Stack trace: #0 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/CheckServerResponseTrait.php(96): OCA\Settings\SetupChecks\SecurityHeaders->getTestUrls() #1 /var/www/sites/nextcloud/apps/settings/lib/SetupChecks/SecurityHeaders.php(71): OCA\Settings\SetupChecks\SecurityHeaders->runRequest() #2 /var/www/sites/nextcloud/lib/private/SetupCheck/SetupCheckManager.php(51): OCA\Settings\SetupChecks\SecurityHeaders->run() #3 /var/www/sites/nextcloud/apps/settings/lib/Controller/CheckSetupController.php(179): OC\SetupCheck\SetupCheckManager->runAll() #4 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(232): OCA\Settings\Controller\CheckSetupController->check() #5 /var/www/sites/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(138): OC\AppFramework\Http\Dispatcher->executeController() #6 /var/www/sites/nextcloud/lib/private/AppFramework/App.php(184): OC\AppFramework\Http\Dispatcher->dispatch() #7 /var/www/sites/nextcloud/lib/private/Route/Router.php(338): OC\AppFramework\App::main() #8 /var/www/sites/nextcloud/lib/base.php(1050): OC\Route\Router->match() #9 /var/www/sites/nextcloud/index.php(49): OC::handleRequest() #10 {main}

Any Ideas where this problem could come from?

Can you post the output of occ config:list system and also manually review your trusted_domains value? Is it maybe accidentally a string and not an array? https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#trusted-domains

Even if only one domain is listed, it should still be bracketed.

That said, I’d expect you to have other problems. Unless maybe you only access Nextcloud via http://localhost?

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": "nc.jhml.de",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nc.jhml.de",
        "dbtype": "mysql",
        "version": "29.0.1.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "3306",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpsecure": "tls",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "theme": "",
        "loglevel": 0,
        "updater.release.channel": "stable",
        "overwritehost": "nc.jhml.de",
        "overwriteprotocol": "https",
        "data-fingerprint": "513e46e025a38537e7c7f01bf288acbc",
        "mysql.utf8mb4": true,
        "filelocking.enabled": true,
        "encryption.key_storage_migrated": false,
        "app_install_overwrite": [
            "browser_warning",
            "nextbackup",
            "twofactor_yubikey",
            "twofactor_rcdevsopenotp",
            "drawio",
            "documentserver_community",
            "files_markdown"
        ],
        "maintenance_window_start": "4",
        "default_phone_region": "DE",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [],
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

In Config:

  'trusted_domains' => 'nc.jhml.de',

No Array, but no array needed.

It needs to be an array. Even if it only contains one element:

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#default-config-php-examples

Ok, didn’t know that. That seem’d to be the fix. That plus making my server now asking the proxy when connecting to itself than trying localhost :smiley:

Thank you

1 Like

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