• I keep getting the Error message HTTP Error come up when I try to upload images. Sometimes they will upload if I resize them but this only works occasionally. It might take one image of a certain size and then kick out the next one even though it is the same size. I am at a loss as to what to do.

    I have already been in touch with the host any they can’t find a problem and say it is a wordpress issue.

    Can anyone help?

Viewing 15 replies - 16 through 30 (of 75 total)
  • For Solution1, are you inserting this into “functions.php” or “function.php” ? Is there a difference?

    Thanks!

    Hi.
    Same problem here. I’ve attempted the three solutions posted by Ahir, as well as adding a filter ot the functions.php file, and adding the “SetEnv” line to the .htaccess file w/o any success in eliminating the HTTP Error. Switching the theme hasn’t worked. My site https://www.ridestoke.com is running on a dedicated server. Bluehost support doesn’t have any insight on the issue, which the issue occurred w/o warning.

    Memory Limit: 256M
    Upload Max Filesize: 50m
    Wordpress 4.5
    Magick is installed on the server.

    Any insight on this issue is greatly appreciated. Just doesn’t make sense.

    Yeh….Solution 1 worked for me

    Solution 1 worked for me too…thanks mate!

    WordPress may have addressed this (or a recent 4.5 Imagick break) in 4.5.1:

    source:branches/4.5@37245

    Still having the same problem after update to 4.5.1

    Same HTTP error here. No fix with 4.5.1

    My bad; I re-read the bug ticket… it didn’t make it into 4.5.1 but is slated for 4.5.2.

    help I tried this and I have this error now

    Parse error: syntax error, unexpected ‘*’ in /home/wintho2/CrossFitTippingPoint.com/wp-content/themes/digitalscience-zen/functions.php on line 6

    I actually started having this issue after uploading to 4.5.1. … Because my page didn’t have a lot of content, I talked to my host provider and they deleted all my content from their server, uninstalled and re-installed WP, but the issue is still there.

    Could someone maybe further explain how to “update” the functions.php … just add those lines after everything and upload the new version?

    Thanks!

    I would suggest trying the .htaccess method first. If you update your theme, it might overwrite the functions.php line. .htaccess is generally not modified.

    The fix they are implementing in 4.5.2 is implementing the .htaccess method into WordPress’ PHP code. This limits Imagick to one thread.

    The functions.php method changes WordPress from Imagick to GD for the image library. These are two VERY DIFFERENT approaches to the fix.

    Hi David,
    def also trying your solution …

    SetEnv MAGICK_THREAD_LIMIT 1

    Where exactly in the .htaccess file should the above line be added?

    SetEnv can go right at Line 1.

    Don’t do both fixes. The functions.php fix will tell WordPress to use the GD library, rendering the Imagick thread limit fix irrelevant.

    David, thanks for you help! We are talking about the .htaccess file located in the public_html folder?

    This is how it’s looking before adding your line:

    # 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

    I inserted your line after # BEGIN WordPress … is that correct? If yes, it is not working for me, I am still getting the “HTTP ERROR” thing. Is there something I’m missing? Thanks!!!

    Yes, the .htaccess in public_html.

    Try putting it at the very first line, before # BEGIN WordPress. The # means a comment, and is ignored, so that shouldn’t matter.

    This adjusts your server environment BEFORE WordPress even starts. It depends on how the server is configured, and if it allows Imagick variables to be set this way. It’s not a guaranteed fix.

    I have not tried the functions.php file fix. You run the risk of that file being over-written if you update a theme. My theme provider has another method for updating your WordPress PHP variables:

    1. Install and activate the GeneratePress Simple PHP plugin. Find the Download Simple PHP link at GeneratePress.com.
    2. Once activated, go to “Appearance > Simple PHP” and you’ll be directed to a file where you can add your custom PHP.
    3. Enter this code into Simple PHP:
      add_filter( 'wp_image_editors', 'change_graphic_lib' );
      
      function change_graphic_lib($array) {
      return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
      }

    This changes WordPress from Imagick to GD for image processing. Your server may or may not include GD, and the GD configuration may or may not work for WordPress. The only way to find out is to try one fix; if it doesn’t work, UNDO that, then try the other fix.

    If it STILL doesn’t work, then we (as a WordPress community) need to keep working to find another viable solution.

Viewing 15 replies - 16 through 30 (of 75 total)
  • The topic ‘HTTP Error. when uploading images’ is closed to new replies.