Last week I mentioned that I was having problems with comment moderation since upgrading to WordPress 2.7. Well, I was also having trouble with the flash uploader. I would get an error and have to use the browser uploader. Not a big deal but it annoyed me and slowed me done because I could only upload one image at a time.
So, I also decided to tackle this when I did my WordPress spring cleaning and I found a solution that worked for me.
When I would try to use the flash uploader for images I would get an error that said HTTP Error in bright red and nothing would happen.
When I started doing some research on the WordPress forums I discovered that there were many causes of this problem and just as many possible solutions. My heart sank a little because I wanted one simple answer and didn’t want to try a lot of different solutions. I am, however, only going to discuss the solution that worked for me.
The error is often caused by mod_security, which is a security module installed by the web host. This can be corrected by modifying the .htaccess file and there are two ways to deal with this.
- Install the Image Upload HTTP Error Fix plugin. The plugin adds the necessary lines to the .htaccess file. I have not tried this plugin so can’t vouch for it but people seem to be using is successfully.
- Edit your .htaccess file. This file is at the root level of your WordPress installation. Download it via ftp, make a copy, and then add the following lines to it.
#BEGIN Image Upload HTTP Error Fix
<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>
#END Image Upload HTTP Error FixThen upload the edited .htaccess back to the root level of your WordPress installation.
I used the second solution because I am familiar with editing the .htaccess file and didn’t want to install another plugin just to do this for me. If you are having a similar problem with the flash uploader this solution may correct it. This thread in the WordPress forums discusses other possible solutions if this one doesn’t work for you.
photo credit: Ray Radlein
Ajith Edassery says
Plugin route may be easier for dummies though you never know the outcome of the plugin. I had some weird plugins in the past that updates robot.txt but I would back it up first, cross check it three four times before allowing the changes.
Editing directly is a better approach like you and I would do (though I am not that good in .ht configurations). Backing up is a step that one should always remember :)
Ajith Edassery´s last blog post – T3Leads review – An affiliate program that is exciting
Kim Woodbridge says
Hi Ajith – I just copied and pasted it into my .htaccess file. But I did back it up first – I’ve made mistakes with it in the past, which made my site inaccessible.
Dennis Edell says
I was just about to make a “ATTENTION NEWBIES” comment in regards to being very careful with the .htaccess.
Awesome savable tips though, thanks. :)
Dennis Edell´s last blog post – 9 Qualities You Should Find In A Good Web Designer
Andrea_R says
Reading the code over, it makes total sense.
For the unfamiliar, it’s overriding a server security setting. In other words, it’s not WP or Flash that’s the problem – it’s the server.
Andrea_R´s last blog post – Two things
Kim Woodbridge says
Hi Andrea – See, that’s why I said you are smart :-) I should clarify that it’s the server causing the error rather than WordPress.
Dennis Edell says
Then shouldn’t one contact the host regarding it?
Dennis Edell´s last blog post – 9 Qualities You Should Find In A Good Web Designer
Kim Woodbridge says
You could try – some hosts incorrectly think they need mod_security.
Tracy says
I would like credit for reading this, even though I am not sure exactly what was said.
Although seriously, the more I just read these kinds of posts from you the more little bits of knowledge I am getting, so thanks so much! When I first started, I didn’t know what a php was! I still don’t precisely but I’m getting a vague idea. That’s progress!
Tracy´s last blog post – 6 Things I secretly hope are included in life coaching
Kim Woodbridge says
Hi Tracy – I guess it would make more sense if you had ever had the error – so you’re lucky :-)
If some of articles are difficult to follow you can also enjoy the photos at the top – I was especially happy with my find for today.
Donace | The Nexus says
Sweet; I’ve had issues with the flash uploader for a while now; will give this a shot.
Donace | The Nexus´s last blog post – Traffic Android Review
Kim Woodbridge says
Let me know if it solves the problem for you – there is more than once cause and solution for flash uploader problems.
Jannie Funster says
I need to get the anti-spam thing, about 95% of comments needing moderation are those. Jeez Louize, get a life people — no one needs your viagra and online slots already.
LOVE the pic you chose for this.
Jannie Funster´s last blog post – Potential Regalements
Kim Woodbridge says
Hi Jannie – Do you use Askimet? It’s not the only anti-spam plugin but it does work really well. And seriously, I think everyone who wants viagra has already purchased it. And the spammers are SO sexist – all their spam is targeted at men ;-)
Thanks for mentioning the photo – I was really proud of that find.
Madhur Kapoor says
I am also facing a problem with the Flash Uploader. When i click on “Choose Files to Upload” , nothing happens while the browser uploader works fine. Any idea what could be the problem ?
Madhur Kapoor´s last blog post – Read It Later Firefox Extension
Kim Woodbridge says
Hi Madhur – Unfortunately, there are so many reasons why the flash uploader might not be working.
In this thread, Otto lists all the main reasons and things to try
http://wordpress.org/support/topic/164999
Also, have you tried in both IE and Firefox?
Madhur Kapoor says
Thanks for the link. Happening in both IE and FF. i think the problem can be in flash player
Madhur Kapoor´s last blog post – Change Desktop Wallpaper Periodically with ThetaWall
Kim Woodbridge says
Hi Madhur – Well, at least that eliminates the browser. Have you tried using a different computer? That might give you more information. And maybe something on that list will help.
Hoi An says
Thanks for this post.
It work for me.
.-= Hoi An´s last blog ..Hội An: Giới thiệu tiềm năng du lịch trên mạng =-.
Kim Woodbridge says
Hi Hoi – Great! I’m glad it fixed the problem.
Nils Geylen says
Just chiming in to say it worked for me. Cheers.
Kim Woodbridge says
Hi Nils – Great! Thanks for letting me know.
steph says
hey there – it worked for me as well. cheers!
Kim Woodbridge says
Hi Steph – Great! I’m glad it solved the problem.
Sol says
Hi –
Thanks for your post. I have been using the flashuploader without any problem for a while. Suddenly it stops working and I cannot find the solution, despite trying many different “solutions”. ARGGHH!
Now when I upload an image using the flashuploader, i just get the little red HTTP Error – and that’s it. And only in Firefox – IE works fine – curious eh?
I also have another WordPress site, but there’s no problem with that one, so I figure “it must be something in this site”.
So, I disabled all of my plugins – still no joy.
Checked that Firefox was up to date – all good.
Then I uploaded the .htaccess file – nope!
Changed all of my setting back to default – nope.
Contacted my webhost, gave them a username and password so they can recreate the problem and I’m hoping to get an answer back today….
If that doesn’t work, I am facing the prospect of re-uploading my entire site and starting again…… if I decide I can’t live with the manual upload!
Although It’s a not a biggie – it is sure annoying. WordPress is so great, but it does amaze me that these “erroneous” problems can come up that steal your time.
I’ll keep you updated :-0
Kim Woodbridge says
Hi Sol – If nothing else has changed, it is most likely that something changed with your host.
Did you update Firefox or add a new Firefox add-on?
Sol says
Hi Kim
My host says they cannot replicate the issue. It must be Firefox playing silly devils with me…. but as I say, works fine with my other site!
I’ve cleared my cache and cookies a half a dozen times, checked I’ve got the latest browser version (I do) and update Flash Player too…. still no luck!
How maddening – and how curious…. Will post an update if I ever get to the bottom of it….
Kim Woodbridge says
Hi Sol – Have you tried disabling your Firefox add-ons to see if that helps. At this point that sounds like the most likely culprit.
Chuck says
The weirdest thing happened to me, I use ubuntu and I’d never had this issue before, until a friend of mine tried to upload images using Windows (we tried different browsers)
This fix sure worked for my pal, the true mistery here its: why it’s an issue only in Windows based browsers?
Cheers
.-= Chuck´s last blog ..davidmh: @pancitaict no sabia que tenia otro hermano :/ =-.
Kim Woodbridge says
Hi Chuck – I’m glad the fix helped your friend. That’s odd that it’s a problem for Windows – since the fix is added to the .htaccess that doesn’t make sense logically.
Chuck says
Hi Kim,
The more I think about it, the less sense it makes.
I just made another test in a site without this fix, using both windows and linux, and again the error only happen in windows.
Look: http://i50.tinypic.com/6h8awl.jpg
Kim Woodbridge says
It’s one of those things … I’m scratching my head over it.
Zudie says
Just got my HTTP error resolved.
Editing htaccess did not help, so I contacted my hoster. They whitelisted the WP/Flash upload so it would not trigger the mod_security rules anymore.
Hope this helps someone else because I spent hours trying out differnet solutions.
Kim Woodbridge says
Hi Zudie – Sometimes asking the host about the problem is the best solution – I’m glad it got resolved.
Rocky Tilney says
Thank you, worked great!
Bobby says
Unfortunately, this did not work for me on WordPress 3.1.2.
Kim Woodbridge says
It doesn’t fix it for all issues with this but it is one fix – the article is older now and I haven’t tested it with new versions of WordPress.
Rob says
It worked on a new install of WordPress 3.1.2 for me. Thank you!
Kim Woodbridge says
Hi Rob – Great! I’m glad it worked.
Joke says
thanks! this helped me on a WP site I am making (new install of WP 3.1.3)
Kim Woodbridge says
Great! I’m glad it helped.
Hans Oorschot says
I found deactivating the smush.it plugin solved all my problems…
Kim Woodbridge says
Interesting – there are a number of causes for the uploader error which can make it difficult to troubleshoot.
Avinash Arora says
WOW. I’ve been plagued with this issue so long, and this fix took me all of 30 seconds to implement and it worked exactly as advertised.
I love you.
Kim Woodbridge says
I’m glad it worked! It doesn’t always fix the problem but sometimes it does.
Gonzalo Sanchez says
Everything indicates that the error “HTTP Error” while uploading images is caused by a change in the Apache FastCGI module (mod_fcgid 2.3.6) that limits the value of the parameter MaxRequestLen to 128KB (very low). Previously this limit was 1GB.
Therefore this problem is likely to occur only on servers running PHP in FastCGI mode and only when trying to upload a file larger than 128KB.
The final and stable solution to this problem is well explained in the link that leaves our friend ntarantino.
http://wiki.mediatemple.net/w/(dv)_4.0:Enable_FastCGI
and it works perfectly! :)
but that solution requires access and modify the configuration file of FastCGI. It can be done via SSH or asking the support team of your server to do so.
An intermediate and fast solution I’ve found, for those who need to solve this problem right now and can not modify that file themselves, is as follows:
– Install the plugin WPlupload (nice and efficient plugin that replaces the WP file upload form)
– In the plugin settings indicate 128kb or less in the “Chunk size”
– Enjoy :)
Tell me if this solution works for you.
Gonzalo.
Kim Woodbridge says
Hi – Thanks for the info! The fix in this article worked for me but it doesn’t always correct the problem. It’s great to hear about other solutions.
britain says
More problem since I deactivated the plugin wp_smush.it
Andrés says
I found a bug in a Multimedia Library, in WordPress. It cannot accept filenames with an “x” between two numbers Ej: my-image-160×600.jpg
If you replace the “x” or add a space like. my-image-160 x 600.jpg the file will upload fine.
I hope this help someone.