Bug #1116
closedImage Upload Error
0%
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
Updated by Matt Gold over 13 years ago
- File help-wanted.jpg help-wanted.jpg added
Forgot to add the attachment (314 KB)
Updated by local admin over 13 years ago
Cool, I'll take a look. How does one upload an image to the Gallery Post plugin?
Updated by local admin over 13 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?
Updated by local admin over 13 years ago
Can you upload images to other parts of the website?
Updated by Matt Gold over 13 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.
Updated by Boone Gorges about 13 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.
Updated by Sarah Morgano about 13 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
Updated by Sarah Morgano about 13 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
Updated by local admin about 13 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.
Updated by local admin about 13 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.
Updated by Matt Gold about 13 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