An unhandled exception has been thrown, internal server error

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


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:

Nextcloud version (eg, 20.0.5): /
Operating system and version (eg, Ubuntu 20.04): docker compose / debian
Apache or nginx version (eg, Apache 2.4.25): 2.4.38
PHP version (eg, 7.4): 7.4.21

The issue you are facing:

An unhandled exception has been thrown:,
ParseError: syntax error, unexpected ''' (T_ENCAPSED_AND_WHITESPACE), expecting ')' in /var/www/html/config/config.php:21

Tried to recreate the docker container, thats when it showed this error in the log.
Before that it only show the error in my browser when I try to log in.
I can’t see to find anything wrong with my config.php file, how can I troubleshoot this issue?

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

Not quite sure.

The output of your Nextcloud log in Admin > Logging:

An unhandled exception has been thrown:,
ParseError: syntax error, unexpected ''' (T_ENCAPSED_AND_WHITESPACE), expecting ')' in /var/www/html/config/config.php:21,Initializing nextcloud ...,
Upgrading nextcloud from ...,
Initializing finished,
Stack trace:,
#0 /var/www/html/lib/private/Config.php(68): OC\Config->readData(),
#1 /var/www/html/lib/base.php(149): OC\Config->__construct('/var/www/html/c...'),
#2 /var/www/html/lib/base.php(569): OC::initPaths(),
#3 /var/www/html/lib/base.php(1076): OC::init(),
#4 /var/www/html/console.php(49): require_once('/var/www/html/l...'),
#5 /var/www/html/occ(11): require_once('/var/www/html/c...'),
#6 {main}�AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using Set the 'ServerName' directive globally to suppress this message

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
  'instanceid' => '***',
  'passwordsalt' => '***',
  'secret' => '***',
  'trusted_domains' =>
  array (
          0 => '',
          1 => '***',
          2 => '***',

  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '***',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '***',
  'installed' => true,
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,


version: '2'


    image: mariadb
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
      - db:/var/lib/mysql
      - MYSQL_PASSWORD=***
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

    image: nextcloud
    restart: always
      - 8080:80
      - db
      - /mnt/storage/nextcloudData:/var/www/html
      - MYSQL_PASSWORD=***
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db

The error you are getting is very specific. It says that there is an extra single-quote on line 21 of config.php.

What you are showing on line 21 is 'passwordsalt' => '***',
*** You have hand edited this line, therefore we can’t see the extra single-quote that you have in it.

Thank you for your reply!
Yeah I also thought there were something wrong with the password, but this setup has been running for over 2 months and now it suddenly stopped. Only thing happened was a reboot.

The password contains only alphanumerical signs and a + sign.