Project

General

Profile

Actions

Bug #1116

closed

Image Upload Error

Added by Matt Gold over 12 years ago. Updated over 12 years ago.

Status:
Resolved
Priority name:
High
Assignee:
-
Category name:
WordPress (misc)
Target version:
Start date:
2011-08-15
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Hi André --

I ran into the following error while trying to upload an image to the Gallery Post plugin that we use for the slider on the homepage:

"The requested resource
/wp-admin/media-upload.php
does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit."

The image was small (attached to this ticket), so I imagine that this is a permissions issue.


Files

help-wanted.jpg (307 KB) help-wanted.jpg Matt Gold, 2011-08-15 10:10 PM
fire.jpg (101 KB) fire.jpg Matt Gold, 2011-08-16 12:44 PM
Actions #1

Updated by Matt Gold over 12 years ago

Forgot to add the attachment (314 KB)

Actions #2

Updated by local admin over 12 years ago

Cool, I'll take a look. How does one upload an image to the Gallery Post plugin?

Actions #3

Updated by local admin over 12 years ago

Looks like mod_security is blocking the operation:

[Mon Aug 15 22:07:40 2011] [error] [client 108.54.106.208] ModSecurity: Request body (Content-Length) is larger than the configured limit (131072). [hostname "commons.gc.cuny.edu"] [uri "/wp-admin/media-upload.php"] [unique_id "2Cfd0H8AAAEAACqSm7sAAAAR"]

Seems like the size limit is currently set to 131kb for some reason. perhaps it was always this, but mod_security was somehow not actually executing?

Actions #4

Updated by local admin over 12 years ago

Can you upload images to other parts of the website?

Actions #5

Updated by Matt Gold over 12 years ago

Looks like it's probably a size issue. Here's what I just did:

-- On a test blog elsewhere on the site, I was able to add the smaller attached image (fire.jpg)

-- On that same test blog, I could not upload the larger help-wanted image. Here's the error I received:
The requested resource
/wp-admin/media-upload.php
does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.

-- I tried again through the gallery post interface, and received the same error with the help-wanted image. I was able to upload the smaller fire image.

So, I do think this has something to do with size.

Gallery posts, FYI, are added through a widget on the dashboard of the main blog. But given what I've seen above, it looks like any blog on the Commons can be used to test this out.

Thanks for your work on this and please let me know whether/when you want me to try again.

Actions #6

Updated by Boone Gorges over 12 years ago

  • Category name changed from BuddyPress (misc) to WordPress (misc)
  • Priority name changed from Normal to High

Hi André,

I just got a report from another user with the same problem. It looks like it's affecting all WP blogs (as one would expect, I suppose), so I'm bumping the priority a bit.

The file in question (wp-admin/media-upload.php) should be able to accept POST request much larger than 131kb - the application-level cap on uploaded files is 5MB.

Actions #7

Updated by Sarah Morgano over 12 years ago

Hi,

I just tested some larger files on the wiki and also the group files and had the same error message: "Request Entity Too Large"

/groups/sarahs-sandbox-group/documents/
/wiki/index.php/Special:Upload

Best,
Sarah

Actions #8

Updated by Sarah Morgano over 12 years ago

Hi André,

I don't know if this makes a difference, but I was able to upload word.doc's and excel files without any issues. It seemed to be the .pdf's and .jpg's that I was having difficulty with.

Best,
Sarah

Actions #9

Updated by local admin over 12 years ago

Sarah Morgano wrote:

Hi André,

I don't know if this makes a difference, but I was able to upload word.doc's and excel files without any issues. It seemed to be the .pdf's and .jpg's that I was having difficulty with.

Best,
Sarah

Thanks, Sarah. I think it's related on the file size, but I'll keep an eye out for that angle.

Actions #10

Updated by local admin over 12 years ago

Ok, I put a fix in for this by changing /etc/httpd/conf.d/mod_security.conf and increasing the memory limit to ~5MB.

Tested ok, but please test this for me as well and confirm, guys.

Actions #11

Updated by Matt Gold over 12 years ago

  • Status changed from Assigned to Resolved

Hi André,

I can confirm that this is working now. Thanks for your work on this!

Best,

Matt

Actions

Also available in: Atom PDF