0

I'm running a 4.1.1 Wordpress without plugins and while trying to upload an image (2mb in this exemplary case) I get:

    'http error'

when I retry it returns

has failed to upload due to an error File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini. '

I have googled (of course) and checked my php.ini settings using phpinfo inside the /wp-content directory.

    file_uploads on
    memory_limit 128M
    upload_max_file_size 25M 
    post_max_size 25M

The permissions on /wp-content as well as /wp-content/uploads are in order. the tmp directory is writable and the disk is not full.

I have walked through these 2 questions arlready:

Not going to mention all Wordpress forum posts and not running on bluehost or anything like that. Running on my own iron box (Debian)

Any clues?

0

2 Answers 2

0

Be sure that all above mentioned php.ini values are valid on the wordpress root folder.

When you only apply these for /wp-content (and up) you get the above weirdness.

0

I had a lot of problem with this error related to some user roles. "Admin" and "author" could upload full size images (25mb in my case), but i.e. "contributor" only 2mb or receive this error. I think it's due to some permissions related to image management interface. And some plugin add several roles with different permission (i.e. commerce plugins add "vendor" role). After some troubles, I resolved using Role Editor Plugin and enabling "edit_published_posts" (under core) to user roles that have this problem (in my case "Vendor)".
I hope this can help somebody.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.