Close Panel

2

Jul

2008

Wordpress Image Upload HTTP Error

By Chewie. Posted in General | Comments

I have been enjoying using the latest version of Wordpress but i am getting seriously pissed off with the fact that every time i try and upload an image i am presented with some red text that tells me “HTTP Error”.

As you can see that text is really not very helpful, so its hard to find out exactly what the issue with Wordpress is. Now i have been searching the net for the answers and the most common answer is to insert this code into your .htaccess.

<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>

However, if like me you tried this and it didn’t work, your problem might be something a lot more strange.

[JUMP TO SOLUTION WITHOUT READING MY FINDINGS]

I got onto my hosts because i thought it might be something a bit more serious on the web server, when George (the web host guy) tried to upload an image he managed to do it ok without any sort of problem, i thought it was a bit weird so asked what OS and browser he was using and it turns out it was XP and IE.

I finished off the chat and booted my MacBook into XP mode, opened up IE and sure enough i could upload an image into Wordpress, how fucking weird? Well next i opened Firefox in XP and tried to do it… worked again.

So i booted back into OSX and tried it from Firefox… didn’t work, so i opened up Safari.. didn’t work, i even asked the Evil Green Donkey and some others in my office to try it from their Macs… didn’t work.

For what ever reason which i really can’t get my head around, it seems that this is an issue that is specifically with Flash on the mac, it doesn’t even seem browser related. And i have tried this on over 6 different installs of Wordpress on multiple hosting accounts.


I reinstalled flash for the mac and tried every possible solution to this problem which are listed on the wordpress blog and on another site i found and still no joy. The ONLY way i can upload images to any of my blogs using OSX is to disable the flash image uploader by using the no-flash-uploader plugin, this reverts it back to the html version. To use, simply put that file into your /wp-content/plugins/ folder and then activate it through the plugins section of your admin area.

Now i can have images again, but i do hope that someone finds the issue and fixes it, in the mean time enjoy a picture that proves that none of this is an issue with my hosting and that images work fine once the flash uploader has been disabled. Now all i need to do is install the above mentioned plugin on all of my sites :o (

As usual, please leave a comment if you have experienced this issue.

About the Author:

Chewie is from a mysterious part of the United Kingdom called Up Norf. He has been working in web development and SEO for over ten years, beginning as a developer and moving to SEO in search of the perfect rank. As well as SEO he likes football, beer, girls and gravy - often at the same time.
Email this author | All posts by Chewie | Subscribe to Entries (RSS)

 
  • Thank you SO much. On OSX too, and nothing else worked.

    You're a star.
  • Yeah its so weird Kester, i really do hope that it will be solved soon. Glad it helped you out though.
  • frebro
    Yes, this solved the issue for me. I'm also on Mac OS X Leopard with Flash 9.0.124.0, and using the latest Safari for WP admin. Wordpress stopped generating thumbnails for me though. Whatever size I choose to include it always uses the original size.
  • Hell yea! I drove myself crazy trying to solve it. And like you, drove my host up the wall to!

    Trying the no-flash one now... but I'm never going to IE! I'm happy with Mac + FF!
  • Yeah it is absolutely crazy, and like i say it just seems to be a mac + flash issue.

    I am happy to use the non flash version as it doesnt add that much extra functionality.
  • Have you upgraded to 2.6.1 yet? Are you still having this problem.

    I'm having problems too and they're not fixed by the htaccess solution.
  • Hey Kristarella,

    I have upgraded to the latest version of wordpress and the issue still seems to be there. I am happy enough using the normal html version for uploading.
  • Well, it's pretty weird. I uploaded the no-flash plugin and like those above, the stupid HTTP error is gone and I can deal with images.

    On WordPress 2.5.1 using Sea Monkey for Admin with Mac OS 10.4.11. But the funny thing is that this has just started happening. This makes me think there is a plugin conflict. Bad Behaviour has long been deactivated so it must be another one.

    In the interim I've been uploading images with FTP and coding them as if I was on a web site years ago. May just continue with this method until I take the time to deactivate one plugin after another to see who the culprit is.

    Thanks mucho for the valuable tip.
  • Thank you SO much for this! I began hating Wordpress because of that horrid Flash Uploader. The plug-in cured my hatred for the blogging platform!
  • Hey Jeremy, glad you could get it sorted. I am still looking for an explanation as to why it doesn't work though :)
  • Hi Peeka:

    Thanks for the link, unfortunately it won't fix this particular http upload error. Might help some people out though :)
  • I have the same problem but XP and Firefox. Possible fix posted here: http://wpwatch.net/2008/10/14/wordpress-image-f...
  • Hi n1ce,

    The fix that you linked to is the same bit of code that i have at the very start of the blog post. Unfortunately it won't actually sort this particular http upload error.

    Thanks for the comment and link though :)
  • That plugin actually did the trick for me!

    Well, not really, but it did remove the problem for the customer, who does not care which version she is using.

    Thanks for making me aware of that plugin
  • Thanks for sharing this :)

    I made a small modification since I needed it for wpmu (i.e. both mac and non-mac users):

    add_filter('flash_uploader', 'noflashuploader');
    function noflashuploader(){
    $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';

    if(strpos($user_agent, 'mac') !== false) {
    return false;
    } else {
    return true;
    }
    }


    for wpmu I uploaded it to the muplugins directory
  • Sam
    Thanks for sharing this. I have been trying to solve this same problem for few months now and nothing worked. But today I downloaded flash player 10 (I was using version 9) and everything works great !

    Im using wp 2.7
  • Pers & Sam:

    Thanks both for the comments, I haven't had a chance to try the code or upgrade to version 10 yet. I have also been running MAC 9,0,124,0 version of Flash player for some time.
  • fix Wordpress Image Uploader go here.

    http://www.ibuyringtones.com/iblog/category/wor...
  • I'm posting this because I've been tearing my hair out for weeks trying to suss this out, and I couldn't find any solutions online.

    When I tried to use the Flash uploader in Wordpress 2.7 with a Mac (both Safari and Firefox) with Flash 10 I would get an HTTP Error message, whereas I could upload fine from a PC, both IE and Firefox, with Flash 10.

    After having gone through lots of ideas, I finally hit on the fact that the site was behind an htaccess / htpaswd restriction because it was in development and I didn't want other people to see it.

    When I commented those lines out of the htaccess file it worked perfectly.

    I have a feeling that this also applies to some plugins, like the WordPress Authentication Plugin, with which I had the same problems. (I can't check this, because that blog has to stay on 2.6 for various reasons, and the 2.6 Flash uploader doesn't seem to work at all with Flash 10).

    I'm guessing it's because Flash is more tightly integrated with browsers in Windows, whereas perhaps Flash on a Mac doesn't pick up the authentication information from the browsers. Or something...
  • joelnagy
    I had been searching for a solution to this issue for a couple of days and realized that the authentication was issue when I read your comment. Thanx a lot.
  • gimpusmons
    This is not a Mac-only problem. I use Vista 64 with Wordpress 2.7 and the Flash image uploader in Wordpress stopped working for me recently but only in Firefox 3. It still worked fine in Explorer 8 Beta 2. My fix was simple. I reinstalled the Flash browser plugin for Firefox and it started working again immediately.
  • In my case it is not Mac or Windows or the server or the full moon - it's htaccess + .htpasswd.

    I can't use the flash based uploader because the site is protected by .htaccess and .htpasswd just like Adrian's site but unlike Adrian I can't comment out the lines causing this problem because I don't know what they are and it might make the site accessible to all while I am updating(not good on a paid-access-only site).

    So I leave .htaccess alone and use the Flexible Upload plugin to be able to upload multiple images and Scissors plugin to be able to resize them. I also use Faster Image Insert plugin.

    Flexible Upload does not work well with WP 2.7.1 - it creates a PHP error right on the Post editing page but this error does not stop you from being able to upload.Although all the nifty Flexible Upload options are rendered useless....

    Because of the PHP error I worry that using the depreciated plugin is making the site insecure so I am always on the look out for a real fix not the sloppy mess that I am using!
    Which is how I found your post. Unfortunately for me I have to stay with the sloppy mess until a non flash multiple uploader, 2.7.1 compatible plugin or tweak comes around.
  • mxcm428
    I agree with that,Great minds think alike!!
  • Hey there,
    Well, the message I keep getting refers to some sort of 'data connection error'.
    No idea what that is. Anyway, I'm going to give your method a go, even though you had a slightly different problem. You never know, it might just work. I'll report back when I've tried it. Thanks.
  • Wade
    I was having the same problem with FF3.5/XP . I just tried the 'Browser uploader' and got the following error;
    You have used your space quota. Please delete files before uploading.

    I'm contacting my admin to increase our quota...
  • dbarradas
    try this:

    Here is what they said:

    "Modsecurity was blocking the useragent of the flash uploader. This is common. I disabled the block."

    When I asked for more details about where exactly they made this change, they said:

    "I simply removed the useragent block in /usr/local/apache/conf/modsec2.user.conf"

    Hopefully someone else will find this useful.

    (this did the trick for me ... via http://wordpress.org/support/topic/293853)
  • I like that you think. Thank you for share very much.
blog comments powered by Disqus