Internal server error due to php.config file

Nextcloud version _28.0.1
Operating system and version _ubuntu 20.04
Apache version: apache2 2.4.41
PHP version _ 8.3

The issue you are facing:
i get a internal server error when i try to look up my nextcloudserver. it ran fine last week. my /var/log/apache2/error.log tels me it is something with my php.config. ran it throug a php code checker and it tels me: here are 2 more opening parenthesis ‘(’ found. *This count is unaware if parenthesis are inside of a string. houwever i don’t know how to fix it

Is this the first time you’ve seen this error? yes

this is the content of my php.config file:

<?php
$CONFIG = array (
  'instanceid' => 'sensitive data redacted by Mod/JK',
  'passwordsalt' => 'sensitive data redacted by Mod/JK',
  'secret' => 'sensitive data redacted by Mod/JK',
  'trusted_domains' =>
  array (
    0 => 'sensitive data redacted by Mod/JK',
    1 => '172.201.99.203',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '28.0.1.1',
  'overwrite.cli.url' => 'sensitive data redacted by Mod/JK',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:80',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'sensitive data redacted by Mod/JK',
  'dbpassword' => 'sensitive data redacted by Mod/JK',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'app_install_overwrite' =>
  array (
    0 => 'ldapcontacts',
  ),
  'mail_smtpdebug' => true,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'defaultapp' => '',
  'mail_smtpport' => '465',
  'mail_domain' => 'sensitive data redacted by Mod/JK',
  'mail_from_address' => 'sensitive data redacted by Mod/JK',
  'mail_smtphost' => 'sensitive data redacted by Mod/JK',
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' =>
  array (
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
    0 => 'sensitive data redacted by Mod/JK',
    1 => 'sensitive data redacted by Mod/JK',
    'mail_smtpstreamoptions' =>
    array(
            'allow_self_signed' => true,
            'verify_peer' => false,
            'verify_peer_name' => false,
  ),

this is the content of my php.config file:

Please place your posted configuration snippet inside a preformatted text block if you want us to take a look at it. Otherwise it’s nearly impossible to read. :slight_smile:

@Jamie_van_Kollenburg

pls take care not to post sensitive data from your serverconfig. :face_with_spiral_eyes:

@jtr

done

You didn’t close all arrays.

Add two new lines to the end of the file, with ), and a ); as follows…

There is missing a “),” at the end.

As you can see, there is a" (" in the 1st line I quoted
array (
Then you will find

'mail_smtpstreamoptions' =>
array(

three lines below. Now we have two “(”, but at the end there only is one “),”
So add a line with
),
at the end

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