0

I have a really strange problem - we created a tailored CMS-System for our clients (html, css, js, php, mysql) we have a built-in mediathek, the problem is the file-uploader.

When I upload a file (with ajax), my console tells me (errors are logged in the console) "Request Entity Too Large" - this error appears every time, when iItry to upload a file > 1MB

The strange thing here is, that we have a url with many subdomains and on every other subdomain it works perfectly, its the same cms with the same settings... can you help me?

What I already tried:

  • .htaccess: LimitRequestBody 99999999999 / LimitRequestBody 0
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Mathis Hüttl
  • 93
  • 2
  • 11

2 Answers2

0

413 errors occur when the request body is larger than the server is configured to allow. Here’s how you can fix it, depending on your web server:

Apache: Set the LimitRequestBody directive in either your httpd.conf file or a local .htaccess file. (https://stackoverflow.com/a/3719358/1688568)

You also might want to try increasing PHP’s upload_max_filesize and post_max_size settings in php.ini or using the php_value directive in your .htaccess file if you’re using Apache (http://davidwalsh.name/php-values-htaccess).

Community
  • 1
  • 1
Łukasz D. Tulikowski
  • 1,440
  • 1
  • 17
  • 36
0

Problem is when you have SSL enabled, it has a default configuration SSLRenegBufferSize in 131072 (128k). adding this directive in the virtual host directory you increase the size error no longer appears

<VirtualHost *:443>
   # ...
   <Directory ...>
        #...
        SSLRenegBufferSize 8388608 # 8M
    </Directory>    
</VirtualHost>

add only

SSLRenegBufferSize 8388608 (without # 8M )

Łukasz D. Tulikowski
  • 1,440
  • 1
  • 17
  • 36