Internal Server Error without any hint

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 : 18.0.6
Operating system and version: Debian 9
Apache or nginx version: Apache 2.4.25
PHP version: 7.4.7

The issue you are facing:
My instance was running fine. But I had some issues with phpmyadmin. So i tried sorting them out and ended up with:

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 server log.

Is this the first time you’ve seen this error? Y:

Steps to replicate it:

  1. Try to acces the nextcloud instance

The output of your Nextcloud log in Admin > Logging:

empty :-(

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

<?php
$CONFIG = array (
  'instanceid' => 'ochb3x8n33ua',
  'passwordsalt' => 'xxxxxxxxxxxxxxxx',
  'secret' => 'yyyyyyyyyyyyyyyyy',
  'trusted_domains' => 
  array (
    0 => 'www.mydomain.de',
    1 => 'thorin',
    2 => '192.168.2.20',
  ),
  'datadirectory' => '/mnt/daten/nextcloud',
  'overwrite.cli.url' => 'https://www.mydomain.de',
  'dbtype' => 'mysql',
  'version' => '18.0.6.0',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_nextadmin',
  'dbpassword' => 'xxxxxxxxxxxxxxxxx',
  'logtimezone' => 'UTC',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
   'port' => 6379,
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'mail_from_address' => 'my.name',
  'mail_smtpmode' => 'smtp',
  'mail_domain' => 'mailbox.org',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.mailbox.org',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'my.name@mailbox.org',
 'mail_smtppassword' => 'yyyyyyyyyyyyyyy',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'mysql.utf8mb4' => true,
  'skeletondirectory' => '',
  'updater.release.channel' => 'stable',
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' => 
  array (
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
);

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

nothing with errors

Do you really use Debian 9 with php 7.4 ?
https://packages.debian.org/de/stretch/php

Two further ideas:

a.) execute php in command line:
sudo -u www-data php /var/www/html/nextcloud/index.php

b.) look in Firefox or other browser the network communications (press F12)
Please post the lines with http not 200.

Yes, I’ve upgraded to PHP 7.4 a long time ago and it used to work fine

when executing PHP
sudo -u www-data php /var/www/nextcloud/index.php

I get the same error message:

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 server log.

Ok. You must set the path to your nextcloud-installation. Perhaps it is not /var/www/html/nextcloud.

dpkg -l |fgrep php

Fixed it …
And there are no lines with Status 200.

Just “500” for the “index.php”

Yes? And how?

Just the “php” error. I got the wrong path.

Nextcloud is in:

/var/www/nextcloud (not in “html”)

when executing PHP
sudo -u www-data php /var/www/nextcloud/index.php

I get the same error message:

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 server log.

Please post something from /var/log/apache2/error.log .

That’s the last from the logfile

[Mon Jul 06 12:52:20.421138 2020] [mpm_prefork:notice] [pid 4443] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2u mod_wsgi/4.5.11 Python/2.7 configured – resuming normal operations
[Mon Jul 06 12:52:20.421182 2020] [core:notice] [pid 4443] AH00094: Command line: ‘/usr/sbin/apache2’
[Mon Jul 06 12:52:22.384522 2020] [php7:error] [pid 4444] [client 192.168.2.10:50668] PHP Parse error: syntax error, unexpected ‘;’, expecting ‘)’ in /var/www/nextcloud/config/config.php on line 24
[Mon Jul 06 12:52:22.565239 2020] [php7:error] [pid 4445] [client 192.168.2.10:50670] PHP Fatal error: Uncaught Error: Call to a member function getRequest() on null in /var/www/nextcloud/remote.php:51\nStack trace:\n#0 /var/www/nextcloud/remote.php(170): handleException()\n#1 {main}\n thrown in /var/www/nextcloud/remote.php on line 51
[Mon Jul 06 12:52:27.559600 2020] [php7:error] [pid 4446] [client 192.168.2.10:50672] PHP Fatal error: Uncaught Error: Call to a member function getRequest() on null in /var/www/nextcloud/remote.php:51\nStack trace:\n#0 /var/www/nextcloud/remote.php(170): handleException()\n#1 {main}\n thrown in /var/www/nextcloud/remote.php on line 51
[Mon Jul 06 12:52:32.568856 2020] [php7:error] [pid 4444] [client 192.168.2.10:50674] PHP Fatal error: Uncaught Error: Call to a member function getRequest() on null in /var/www/nextcloud/remote.php:51\nStack trace:\n#0 /var/www/nextcloud/remote.php(170): handleException()\n#1 {main}\n thrown in /var/www/nextcloud/remote.php on line 51
[Mon Jul 06 12:52:37.553531 2020] [php7:error] [pid 4445] [client 192.168.2.10:50678] PHP Fatal error: Uncaught Error: Call to a member function getRequest() on null in /var/www/nextcloud/remote.php:51\nStack trace:\n#0 /var/www/nextcloud/remote.php(170): handleException()\n#1 {main}\n thrown in /var/www/nextcloud/remote.php on line 51
[Mon Jul 06 12:52:42.551787 2020] [php7:error] [pid 4446] [client 192.168.2.10:50680] PHP Fatal error: Uncaught Error: Call to a member function getRequest() on null in /var/www/nextcloud/remote.php:51\nStack trace:\n#0 /var/www/nextcloud/remote.php(170): handleException()\n#1 {main}\n thrown in /var/www/nextcloud/remote.php on line 51
[Mon Jul 06 12:52:47.550606 2020] [php7:error] [pid 4444] [client 192.168.2.10:50682] PHP Fatal error: Uncaught Error: Call to a member function getRequest() on null in /var/www/nextcloud/remote.php:51\nStack trace:\n#0 /var/www/nextcloud/remote.php(170): handleException()\n#1 {main}\n thrown in /var/www/nextcloud/remote.php on line 51
[Mon Jul 06 12:52:52.556611 2020] [php7:error] [pid 4445] [client 192.168.2.10:50684] PHP Fatal error: Uncaught Error: Call to a member function getRequest() on null in /var/www/nextcloud/remote.php:51\nStack trace:\n#0 /var/www/nextcloud/remote.php(170): handleException()\n#1 {main}\n thrown in /var/www/nextcloud/remote.php on line 51
[Mon Jul 06 12:52:57.553073 2020] [php7:error] [pid 4446] [client 192.168.2.10:50686] PHP Fatal error: Uncaught Error: Call to a member function getRequest() on null in /var/www/nextcloud/remote.php:51\nStack trace:\n#0 /var/www/nextcloud/remote.php(170): handleException()\n#1 {main}\n thrown in /var/www/nextcloud/remote.php on line 51
[Mon Jul 06 12:53:02.554943 2020] [php7:error] [pid 4444] [client 192.168.2.10:50688] PHP Fatal error: Uncaught Error: Call to a member function getRequest() on null in /var/www/nextcloud/remote.php:51\nStack trace:\n#0 /var/www/nextcloud/remote.php(170): handleException()\n#1 {main}\n thrown in /var/www/nextcloud/remote.php on line 51
[Mon Jul 06 12:54:36.312728 2020] [mpm_prefork:notice] [pid 4443] AH00169: caught SIGTERM, shutting down
[Mon Jul 06 12:54:36.425426 2020] [mpm_prefork:notice] [pid 4475] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2u mod_wsgi/4.5.11 Python/2.7 configured – resuming normal operations
[Mon Jul 06 12:54:36.425482 2020] [core:notice] [pid 4475] AH00094: Command line: ‘/usr/sbin/apache2’
[Mon Jul 06 12:54:57.328862 2020] [mpm_prefork:notice] [pid 4475] AH00169: caught SIGTERM, shutting down
[Mon Jul 06 12:54:57.444289 2020] [mpm_prefork:notice] [pid 4501] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2u mod_wsgi/4.5.11 Python/2.7 configured – resuming normal operations
[Mon Jul 06 12:54:57.444347 2020] [core:notice] [pid 4501] AH00094: Command line: ‘/usr/sbin/apache2’
[Mon Jul 06 13:00:03.596773 2020] [mpm_prefork:notice] [pid 4501] AH00169: caught SIGTERM, shutting down
[Mon Jul 06 13:00:03.704504 2020] [mpm_prefork:notice] [pid 4561] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2u mod_wsgi/4.5.11 Python/2.7 configured – resuming normal operations
[Mon Jul 06 13:00:03.704551 2020] [core:notice] [pid 4561] AH00094: Command line: ‘/usr/sbin/apache2’
[Mon Jul 06 13:38:17.956611 2020] [mpm_prefork:notice] [pid 4561] AH00169: caught SIGTERM, shutting down
[Mon Jul 06 13:38:18.082098 2020] [mpm_prefork:notice] [pid 7592] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2u mod_wsgi/4.5.11 Python/2.7 configured – resuming normal operations
[Mon Jul 06 13:38:18.082155 2020] [core:notice] [pid 7592] AH00094: Command line: ‘/usr/sbin/apache2’

Zeig mal die Zeile 24 der Datei /var/www/nextcloud/config/config.php auch wenn sie von Snap generiert wurde.

sed -n '24 p' /var/www/nextcloud/config/config.php

Oder mit einen Editor wie z. B. Vim oder Nano raussuchen.

‘memcache.local’ => ‘\OC\Memcache\Redis’,

I just found another error. As mentioned in the first post I’ve had issues with “phpmyadmin”. It seems I’ve messed around with the right for the “oc_nextcloud” user :frowning:
After granting the rights for the database it seems to work again.

Thanks for your help!

Ok. Thats fine. Perhaps the error on line 24 changes to another line. I see no error in your posted line. Sometimes the error is a line above or below.