I am using WordPress 3.4.1 on Ubuntu 12.04 using Apache and PHP 5.3.X
When I login to the dashboard and add a new post. Then try uploading an image to set as a featured image, I get a red box with a message “HTTP Error”.
I have read about people saying to not use the flash uploader and just use the browser uploader, but when I try that, I just get a 500 Internal Server Error.
I have tried adding AddType x-mapp-php5 .php
at the top of my .htaccess file, with no luck in change.
Disabling ALL plugins had no effect.
I tried a fresh install. No luck.
Update 10/17/2016 –
If you’re using custom roles or capabilities, please try using a native role/capabilities and try again.
Things to consider checking:
- File ownership
- File permissions
- .htaccess configuration
- PHP Version 7+
- WordPress Current Version
If you’re operating behind a proxy, be sure you have your proxy server timeouts configured correctly.
I put the following code into my functions.php
file. It works!
add_filter( 'wp_image_editors', 'change_graphic_lib' );
function change_graphic_lib($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
}
When this helps it is because it changes the PHP code module used for processing the uploaded image for use with WordPress.
This processing includes moving the image into the media library database and generating the different size images (“thumbnail”, “medium”, “large”) that WordPress always wants available for themes to access.
It causes the “GD” module to be used, because it is first. In some server setups, the newer “Imagick” library isn’t playing well with others for certain image scenarios, such as large pixel dimensions, so forcing the “GD” library to be used is a fix.