• Hi,

    When writing a post and trying to upload photos via ‘Add Media’ I get a HTTP Error.

    The file itself uploads just fine, but there’s no thumbnail, no other data, and I cannot view it from the add media screen.

    I have tried:

    – Adding the mod_security information to wp-admin/.htaccess
    – Changing theme back to default
    – Disabled all plugins

    But still no luck.

    The photo I’m trying to upload is just 1.82mb and 4000×3000.

    Running WordPress 4.2.7 on PHP 5.3.29.

    Thank you

Viewing 15 replies - 1 through 15 (of 18 total)
  • Hi,

    did you check the ‘temp’ folder of your server? you can try clearing it.Can i ask which version of Imagick you have?

    Hi @blizeh

    This sounds a lot like the same issue being discussed in this thread.

    Could you try adding the following line to the .htaccess file in the main WordPress directory on your server and see if that resolves your issue?

    SetEnv MAGICK_THREAD_LIMIT 1

    Thanks,
    Joe

    Thread Starter blizeH

    (@blizeh)

    @joe McGill – Thank you, my .htaccess now looks like this:

    AddHandler php53 .php
    Action php53 /cgi-bin/php53.cgi
    
    SetEnv MAGICK_THREAD_LIMIT 1
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    But I’m still getting the same error unfortunately.

    @dimitris33 – thank you, unfortunately I don’t have access to the server’s temp folder, how do I check the Imagick version? I can’t see anything under phpinfo.

    Thanks again

    Thread Starter blizeH

    (@blizeh)

    Just tried adding this to my theme’s functions.php file:

    add_filter( 'wp_image_editors', 'change_graphic_lib' );
    
    function change_graphic_lib($array) {
    return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
    }

    Still getting the same http error ??

    @blize

    this is a temp fix, please try this plugin

    https://github.com/getsource/default-to-gd

    @dimitris33 – thank you, unfortunately I don’t have access to the server’s temp folder, how do I check the Imagick version? I can’t see anything under phpinfo.

    with a phpinfo or asking your hosting company.Don’t you have access to the server? can you ask the person who does?

    Thread Starter blizeH

    (@blizeh)

    Ah, thank you so much! The plugin worked ??

    I tried every tip in all the threads mentioned with no luck. Then the second last post in one of the threads before it was closed recommended to deactivate EWW Image Optimizer if you had it installed. That solved my problem instantly.

    I have had the same problem and tried 5 or 6 methods (including .htaccess edits) I found from forums and posts, which did not work.
    Great news is that GetSource plugin worked and solved this issue. I think at this point this is the real solution to this issue. Some are even saying this is a bug in the latest version WP.

    Thanks, VM dimitris33!

    Version: WordPress 4.5.2

    I use dreamhost.

    Adding the code to the functions.php file did not work for me. Neither did modifying the .htaccess file.
    After perusing couple for a couple hours, I was finally able to solve the problem by switching PHP Mode from PHP 5.6 FastCGI to PHP 5.6 CGI in Dreamhost’s account. For some reason PHP 5.6 FastCGI was causing the media uploader to flake out. I hope this works for some of you.

    • This reply was modified 8 years, 4 months ago by idewpsupport.

    Would be nice to tell us how to use https://github.com/getsource/default-to-gd because I’ve tried it and it did nothing to fix HTTP error.

    Thanks for explaining how to use this plugin as this is my only LAST resource to fix this problem of HTTP error uploading files to media library.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    The HTTP error can be a lot of things. If installing and using the default to GD plugin fixes it, then the issue is that your images are not able to be properly processed by ImageMagik (which is the default option for WP and images).

    The ‘common’ fixes are, in order:

    1. Make SURE you’re on at least PHP 5.6. DreamHost has PHP 7. I personally recommend it.

    2. Check if your tmp folder is full. If you don’t know how, ask your host to make sure it’s not overfull ??

    3. Upload a SMALL image. A JPG or PNG of less than half a meg, not very large. I keep a 900kb gif handy for those tests.

    If that magically works, check the size of the image. WordPress on Shared Hosting packages often has issues with large images. By which I mean file size and dimensions. If your image is over 1600px in any one direction, on shared, it will probably fail because PHP is unable to resize it ??

    If NONE of those work, install the GD plugin. No settings. Just instal, activate, and let it go. That will default to the slower, less optimal, but more fault tolerant GD image libraries.

    Hey thanks.

    I will investigate further…

    I’ve also sent this reply to my server manager.

    regards
    Mario Bruneau

    OK so here is my story about the HTTP error uploading files in media library.

    I am using WordFence Security on ALL my websites and this newly created website on a addon domain WAS NOT USING WORDFENCE YET but since the .htaccess from the master domain name/website had all the codes pertaining to WordFence, all the addon domains are seeing the root .htaccess with the WordFence codes. So I got the HTTP error thing.

    Hope this will help someone else using WordFence for their root domain and have multiple addon domain names and website on the same server.

    regards to all the WordPress community.
    Mario Bruneau

    You can disable the Firewall setting for “Malicious File Upload (PHP)” in the Firewall section of Wordfence to fix this.

    GO TO DASHBOARD

    SETTINGS > MEDIA

    CHANGE THE LARGE SIZE ( THIS SIZE SHOULD BIGGER THAN IMAGE YOUR UPLOADING)

    PLS REPPLY IF IT WoRKS

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘HTTP Error when uploading to WordPress’ is closed to new replies.