Internal Server Error - The server encountered an internal error and was unable to complete your request

The Basics

  • Nextcloud Server version (e.g., 29.x.x):

    • 28.0.2.5
  • Operating system and version (e.g., Ubuntu 24.04):

    • Debian 12
  • Web server and version (e.g, Apache 2.4.25):

    • Apache 2.4.62
  • PHP version (e.g, 8.3):

    • 8.2.26
  • Is this the first time you’ve seen this error? (Yes / No):

    • Yes
  • When did this problem seem to first start?

    • unsure
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)

    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)

    • no

Summary of the issue you are facing:

Since some weeks I getting an Internal Server Error, when I tried to access my nextcloud. I thougt it is maybe because I am running it on an old Debian Buster instance. So I updated everything to the latest. The php Version was already changed before.

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

https://pastebin.com/46J4CNVZ

Web server / Reverse Proxy

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

[Fri Dec 13 00:00:02.169498 2024] [ssl:warn] [pid 11662:tid 11662] AH01909: nextcloud.####url.de####:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 13 00:00:02.170703 2024] [mpm_prefork:notice] [pid 11662:tid 11662] AH00163: Apache/2.4.62 (Debian) OpenSSL/1.1.1w configured -- resuming normal operations
[Fri Dec 13 00:00:02.170720 2024] [core:notice] [pid 11662:tid 11662] AH00094: Command line: '/usr/sbin/apache2'
[Fri Dec 13 00:39:20.632521 2024] [core:error] [pid 500537:tid 500537] [client 8.222.128.126:44312] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Fri Dec 13 09:50:04.901951 2024] [mpm_prefork:notice] [pid 11662:tid 11662] AH00170: caught SIGWINCH, shutting down gracefully
[Fri Dec 13 09:50:05.209966 2024] [ssl:warn] [pid 634183:tid 634183] AH01909: nextcloud.####url.de####:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 13 09:50:05.253031 2024] [ssl:warn] [pid 634184:tid 634184] AH01909: nextcloud.####url.de####:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 13 09:50:05.260749 2024] [mpm_prefork:notice] [pid 634184:tid 634184] AH00163: Apache/2.4.62 (Debian) OpenSSL/1.1.1w configured -- resuming normal operations
[Fri Dec 13 09:50:05.260768 2024] [core:notice] [pid 634184:tid 634184] AH00094: Command line: '/usr/sbin/apache2'
[Fri Dec 13 10:09:48.999233 2024] [mpm_prefork:notice] [pid 634184:tid 634184] AH00170: caught SIGWINCH, shutting down gracefully
[Fri Dec 13 10:09:50.304677 2024] [ssl:warn] [pid 689372:tid 689372] AH01909: nextcloud.####url.de####:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 13 10:09:50.357472 2024] [ssl:warn] [pid 689374:tid 689374] AH01909: nextcloud.####url.de####:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 13 10:09:50.365112 2024] [mpm_prefork:notice] [pid 689374:tid 689374] AH00163: Apache/2.4.62 (Debian) OpenSSL/3.0.15 configured -- resuming normal operations
[Fri Dec 13 10:09:50.365139 2024] [core:notice] [pid 689374:tid 689374] AH00094: Command line: '/usr/sbin/apache2'
[Fri Dec 13 10:11:52.606347 2024] [mpm_prefork:notice] [pid 689374:tid 689374] AH00170: caught SIGWINCH, shutting down gracefully
[Fri Dec 13 10:12:33.874737 2024] [ssl:warn] [pid 555:tid 555] AH01909: nextcloud.####url.de####:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 13 10:12:44.586298 2024] [ssl:warn] [pid 663:tid 663] AH01909: nextcloud.####url.de####:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 13 10:12:44.592650 2024] [mpm_prefork:notice] [pid 663:tid 663] AH00163: Apache/2.4.62 (Debian) OpenSSL/3.0.15 configured -- resuming normal operations
[Fri Dec 13 10:12:44.592668 2024] [core:notice] [pid 663:tid 663] AH00094: Command line: '/usr/sbin/apache2'
[Fri Dec 13 13:12:03.220731 2024] [core:error] [pid 4208:tid 4208] [client 47.84.32.163:60342] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh)

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'xxxxxxxx',
  'passwordsalt' => 'xxxxxxxx',
  'secret' => 'xxxxxx',
  'trusted_domains' => 
  array (
    0 => 'internal_server_ip',
    1 => 'nextcloud',
    2 => 'domain',
    3 => 'localhost',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '28.0.2.5',
  'overwrite.cli.url' => 'http://internal_server_ip',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'user_error',
  'dbpassword' => 'password',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'info',
  'mail_domain' => 'domain',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => 'hoster',
  'mail_smtpport' => 'port',
  'mail_smtpname' => 'mail@mail.com',
  'mail_smtppassword' => 'password',
  'default_language' => 'de',
  'force_language' => 'de',
  'default_locale' => 'de_DEU',
  'force_locale' => 'de_DEU',
  'default_phone_region' => 'DE',
  'session_lifetime' => 86400,
  'auto_logout' => true,
  'auth.bruteforce.protection.enabled' => true,
  'htaccess.RewriteBase' => '/',
  'overwritehost' => 'domain',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'skeletondirectory' => '/var/www/html/core/empty',
  'maintenance' => false,
  'loglevel' => 2,
  'theme' => '',
  'maintenance_window_start' => 1,
);

And now the database driver ist missing, as you can see in your pastebin-log.

1 Like

I am not quite sure how to solve this issue?
My MariaDB is up and running. What exactly do I have to fix to get the connection back?

The could not find driver specifically suggests you don’t have all the appropriate PHP extensions installed. Specifically, the mysql one, since that’s the dbtype you’re using.

When did this problem seem to first start?
unsure

Perhaps you upgraded PHP at some point and overlooked installing some of the appropriate extensions for the new PHP version? In a stock Debian 12 environment the package should be called php-mysql and/or php8.2-mysql.

Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
AIO

FYI: All evidence suggests you’re not using AIO.

1 Like

Thank you for your help. I tried reinstalling both moduls. But the promot says, both are already installed… is there a way, that they have to configurated somehow?

Not generally. Are you using the stock PHP distributed with Debian?

Does MySQL appear in the output of at least the command line mode of PHP?

PHP -m

This is the output.

mysqli
mysqlnd
and pdo_mysql is listed

  1. [PHP Modules]

  2. calendar

  3. Core

  4. ctype

  5. date

  6. dom

  7. exif

  8. FFI

  9. fileinfo

  10. filter

  11. ftp

  12. gd

  13. gettext

  14. hash

  15. iconv

  16. json

  17. libxml

  18. mbstring

  19. msgpack

  20. mysqli

  21. mysqlnd

  22. openssl

  23. pcntl

  24. pcre

  25. PDO

  26. pdo_mysql

  27. Phar

  28. posix

  29. random

  30. readline

  31. Reflection

  32. session

  33. shmop

  34. SimpleXML

  35. sockets

  36. sodium

  37. SPL

  38. standard

  39. sysvmsg

  40. sysvsem

  41. sysvshm

  42. tokenizer

  43. xml

  44. xmlreader

  45. xmlwriter

  46. xsl

  47. Zend OPcache

  48. zlib

  • [Zend Modules]
  1. Zend OPcache

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