Internal Server Error - corrupted files?

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com 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:

example

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

longer
example
here

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): 25.0.2snap1
Operating system and version (eg, Ubuntu 20.04): Debian Bookworm
Apache or nginx version (eg, Apache 2.4.25): Not sure
PHP version (eg, 7.4): Not sure

The issue you are facing:

500 Internal Server Error on going to https://127.0.0.1:444

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

Steps to replicate it:

  1. Go to https://127.0.0.1:444 and get:
Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the webserver log.
  1. Running this command gets the error:
./nextcloud.occ files:scan -all
mkdir: symbol lookup error: mkdir: undefined symbol: is_selinux_enabled
  1. Looking at the output of the php_errors.log shows:
[14-Jan-2023 16:13:56 UTC] PHP Parse error:  syntax error, unexpected token "public", expecting end of file in /snap/nextcloud/33054/htdocs/lib/private/AllConfig.php on line 35
  1. Looking at “AllConfig.php” shows an extremely long line on Line 29:
* You should have received a copy of the G^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ <snipped short>  ^@^@^@^@ed if the value isn't set

For reference, Line 35 is:

        public function getSystemValueBool(string $key, bool $default = false): bool {

The output of your Nextcloud log in Admin > Logging:

Can't access this.

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

<?php
$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' => 
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'log_type' => 'file',
  'logfile' => '/var/snap/nextcloud/current/logs/nextcloud.log',
  'logfilemode' => 416,
  'passwordsalt' => '<deleted>',
  'secret' => '<deleted>',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '<deleted>',
    2 => '<deleted>',
  ),
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '24.0.7.1',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '<deleted>',
  'installed' => true,
  'instanceid' => 'ocd5oudsjxfq',
  'maintenance' => false,
  'mail_from_address' => '<deleted>',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '<deleted>',
  'mail_smtphost' => '<deleted>',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpsecure' => 'tls',
  'mail_smtpname' => '<deleted>',
  'mail_smtppassword' => '<deleted>',
  'mail_smtpauthtype' => 'LOGIN',
  'loglevel' => 2,
  'theme' => '',
);

The output of your Apache/nginx/system log in /var/log/____:

Not sure if necessary?

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

Can't access.