Internal serever error. While trying to log in

Support intro

A perfectly working Nextcloud deployment all of the sudden says *internal server error *

In the file nextcloud.log this is what I get:

  "reqId": "yx1tUeMtNHSbi8TRzgLu",
  "level": 3,
  "time": "2021-04-09T15:15:22+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "PHP",
  "method": "POST",
  "url": "/index.php/login",
  "message": "Unknown: POST Content-Length of 193 bytes exceeds the limit of 4 bytes at Unknown#0",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0",
  "version": ""

My php.ini has this values:
upload_max_filesize= 4G
post_max_size = 4G is for home/non-enterprise users. If you’re running a business, paid support can be accessed via 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:


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


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): 19
Operating system and version (eg, Ubuntu 20.04): debian buster
Apache or nginx version (eg, Apache 2.4.25): Apache2
PHP version (eg, 7.4): 7.3

The issue you are facing:

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

Steps to replicate it:

  1. Open nextcloud web page
  2. Fill in log in credentials
  3. hit the Log in button

The output of your Nextcloud log in Admin > Logging:

can't access Nextcloud other than ssh.  See log above.

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

$CONFIG = array (
  'instanceid' => 'oci2vy493lyo',
  'passwordsalt' => 'XXX',
  'secret' => XXX',
  'trusted_domains' => 
  array (
    0 => 'XXX,
  'datadirectory' => '/mnt/volume_sfo3_02/nextcloud',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'sdfdf',
  'dbname' => 'fdfdf',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'fddfdr',
  'dbpassword' => *a hard password*
  'installed' => true,

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

[Fri Apr 09 15:15:22.782009 2021] [php7:warn] [pid 4101] [client] PHP Warning:  Unknown: POST Content-Length of 193 bytes exceeds the limit of 4 bytes in Unknown on line 0

Why are you not using the search function to find an answer on your question :wink:

perhaps check with a phpinfo() script, which values are really set. php.ini values can be overwritten by other configurations like .htaccess.