Topic on Project:Support desk

"Request Entity Too Large" error

7
Summary by MarkAHershberger

Provider updated mod_security.

RedKnight7 (talkcontribs)

Hi everyone!

I am trying to upload an 11 MB jpg to my Mediawiki and getting this error:

Request Entity Too Large

The requested resource /wiki/index.php
does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.

Then it shows gobbledygook for a dozen lines.

I installed Mediawiki 8/23/16 and have:

MediaWiki	1.27.1
PHP	5.6.30 (cgi-fcgi)
MySQL	5.6.28-76.1-log
ICU	4.8.1.1

The Upload File page says 100 MB is the max allowed. The largest jpg I otherwise uploaded is 9.68 MB. wiki/index.php itself is only about 30 lines long, almost all of them comments, nor have I touched it.

I have been looking at https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads#Set_maximum_size_for_file_uploads but not finding any solution. I'm on a shared server host; querying php.ini shows

  post_max_size 128M
  upload_max_filesize 128M


Can anyone help?

MarkAHershberger (talkcontribs)

Could you point to your wiki if it is public? Also, if you are uploading over https, this SO answer has some pointers. Let me know if any of them helped.

RedKnight7 (talkcontribs)

Thanks Mark, my wiki is mikefay.info/wiki. I will look at the SO page. It is slow going for me because everything's new. I had to find that php.ini is sort of hidden for me, then learn how to get php.ini output, for example. I've been editing wikis for years, but am brand new to having my own, and everything else past Windows, laugh. If you see anything, please say. Thanks!

RedKnight7 (talkcontribs)

Hey look, because this involves a somewhat inaccessible php.ini, and because I don't call them much (laugh), it occurred to me to call my host provider. They asked me detailed info and say they're looking into it. So wait if you please. I will post again here if they did resolve it (what happened), or if they could not.

Thanks!

RedKnight7 (talkcontribs)

Mark (and anyone else interested), the host service looked into it and fixed it. They responded,

The issue was caused by a security rule of an apache module (mod_security) which was getting triggered. I disabled the rule for the file in which it was getting triggered and increased the LimitRequestBody variable which was the issue.

It uploads now. But it won't make a thumbnail, laugh -

Error creating thumbnail: File with dimensions greater than 12.5 MP

It's 11,876 × 8,393 (99.7 MP). I'll look into that tomorrow.

Night! Thanks - Mike

Ciencia Al Poder (talkcontribs)

That error seems expected, rendering a thumbnail of such a big file can be problematic (in terms of available RAM in the server to do the thumbnailing)

MarkAHershberger (talkcontribs)

Glad you were able to get them to fix it.