Unexpted ''dbtype''

I am trying to use the OCC command to change a password for the admin account that I don’t remember. But I keep getting this error:

ParseError: syntax error, unexpected ''dbtype'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /mnt/user/appdata/nextcloud/www/nextcloud/config/config.php:14
Stack trace:
#0 /mnt/user/appdata/nextcloud/www/nextcloud/lib/private/Config.php(71): OC\Config->readData()
#1 /mnt/user/appdata/nextcloud/www/nextcloud/lib/base.php(151): OC\Config->__construct('/mnt/user/appda...')
#2 /mnt/user/appdata/nextcloud/www/nextcloud/lib/base.php(583): OC::initPaths()
#3 /mnt/user/appdata/nextcloud/www/nextcloud/lib/base.php(1111): OC::init()
#4 /mnt/user/appdata/nextcloud/www/nextcloud/console.php(48): require_once('/mnt/user/appda...')
#5 /mnt/user/appdata/nextcloud/www/nextcloud/occ(11): require_once('/mnt/user/appda...')

Here is my config file. I can’t see anything wrong with the dbtype:

  GNU nano 7.0                                                        config.php                                                                  
<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'ocm1trbrserv',
  'passwordsalt' => 'XX',
  'secret' => 'XX',
  'trusted_domains' =>
  array (
    0 => '192.168.0.57:444',
    1 => 'XX',
  ),
  'trusted_proxies' => ['swag']
  'dbtype' => 'mysql',
  'version' => '24.0.12.1',
  'overwrite.cli.url' => 'https://XX/',
  'overwritehost' => '',
  'overwriteprotocol' => 'https'
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.0.57:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '',
  'installed' => true,
);

You need to add a comma after that line so it is:

'trusted_proxies' => ['swag'],

Thanks for the quick response. I realized I missed another comma after that.

1 Like