Forums

2.5 image upload (142 posts)

  1. simonwheatley
    Member
    Posted 8 months ago #

    In my case the issue is within the function wp_handle_upload, which was trying to report an error using the function wp_die... but wp_die generates a human readable error report and doesn't dump anything to the error logs (WHY?!), so all the Flash uploader, receiving something it couldn't understand, could do was report it's generic default error message. Not helpful. Rant over, I'm off to submit a bug report...

  2. buzz
    Member
    Posted 8 months ago #

    I've tried all the fixes listed above and in different variations on the new 2.5 (2.5 dev, not RC) and still can't get an image to upload. I'm a person of only intermediate knowledge/comfort zone at modifying htaccess and such, so if this issue can't be resolved "out of the box", I would imagine that people will soon be leaving WP in droves if they can't perform a simple image upload. Regardless, thanks for all the hard work.

  3. buzz
    Member
    Posted 8 months ago #

    In addition, I've also tried with all plugins deactivated. No go.

  4. simonwheatley
    Member
    Posted 8 months ago #

    The issue I had was that my upload directory wasn't writeable and WP wasn't reporting this error to the uploader correctly, therefore the uploader couldn't display the error to me meaningfully. I've submitted a patch for this issue to WP which hopefully works for them and will be accepted. In the meantime:

    Check your upload directory and all it's subdirectories are writeable.

    Also, bear in mind that the error message "An error occurred in the upload. Please try again later." is the generic default message, so could be used in any number of different situations... i.e. your problem may not necessarily be the same as any other reported problem in this thread, which doesn't make life easier unfortunately.

  5. LSRN94
    Member
    Posted 8 months ago #

    Running 2.5 as of todays release (3/29). mod_security is on and the image uploader is not working for me.

    Image upload box opens fine. Clicking browse opens my PCs dialogue box to choose an image. When uploading the image (.."crunching"..) I get a pop up error box that says:

    Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error.

    Then WP gives me the message "An error occurred in the upload. Please try again later".

    From the server error log I see this:

    ==cb6c7746==============================
    Request: XXX.com 11.222.33.444 - - [29/Mar/2008:13:08:34 -0500] "POST /wp-admin/async-upload.php HTTP/1.1" 406 363 "-" "Shockwave Flash" - "-"
    Handler: application/x-httpd-php
    ----------------------------------------
    POST /wp-admin/async-upload.php HTTP/1.1
    Accept: text/*
    Cache-Control: no-cache
    Connection: Keep-Alive
    Content-Length: 29393
    Content-Type: multipart/form-data; boundary=----------GI3Ef1ei4KM7ae0Ef1gL6Ij5ei4gL6
    Host: xxx.com
    User-Agent: Shockwave Flash
    mod_security-message: Access denied with code 406. Error processing request body: Multipart: final boundary missing [severity "EMERGENCY"]
    mod_security-action: 406

    (domain name and IP edited out)

    Running on a nix system; apache 1.x, php 4.x

    mod_security seems the culprit.

    Changing the .htaccess to turn off mod_security yielded no success either. Hosts that run mod_security will have no gallery upload love?

  6. mcpace
    Member
    Posted 8 months ago #

    Yes I'm getting the vague http error and have tried all of the solutions above, minus inserting the patch code. Hopefully this will be a quick jump to 2.5.1 so I can keep blogging.

  7. LSRN94
    Member
    Posted 8 months ago #

    After a bit of troubleshooting, adding this to the .htaccess file in my WP root worked:


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

    Turns mod_sec off on the async-upload.php file.

  8. avinews
    Member
    Posted 8 months ago #

    Weird, It seems that my image uploads are being uploaded, but I can't choose from them (or see any thumbnails) from the galleries in the flash media library and select them to be posted.

    This is somewhat of a dissapointment, I hope a very swift solution will be available for this problem, or I will go back to 2.3 again.

    (I run Vista and IE7)

    Marcel.

  9. Jimmy_R
    Member
    Posted 8 months ago #

    I also have this error.. argh. Will follow this thread and try hacking with a sandboxed 2.5 and see if I can get it to work. And I agree; People will abandon 2.5 if this feature doesn't work. I'm running 2.3.3 on all my blogs :)

  10. ruigato
    Member
    Posted 8 months ago #

    isnt working for me also..

  11. hexley
    Member
    Posted 8 months ago #

    I think I can sum this up, not sure the solution for the long run.

    Do we all have in common that we have secured .htaccess in wp-admin/ to require a user and a pass?

    If that is the common thread, I bet this has to do with flash, or at least, I think the file uploader is working with flash. I have user/pass set up in WP for the admin area.

    If I remove that feature from wp-admin/.htacess, uploads work as advertised.

    I first thought this was a simple fix of just adding my servers IP to be allowed and not need authentication, however, the file called is called by the client/browser, so that will not work. I have a semi-static IP, so it works for a short time, but I know the second I travel, it will break.

    I think the solution is to exclude the upload php file from the security, but then people know about this, and could try to exploit that one file does not get locked down.

    Here is my .htaccess in wp-admin
    AuthName "Restricted Area"
    AuthType Basic
    AuthUserFile /somewhere/over./the/rainbow/.htpasswd
    AuthGroupFile /dev/null
    require valid-user

    If I rename .htaccess to a.htaccess, in order to disable it, works just fine all over again.
    Can others confirm?

    My server logs show an http 401 error on:
    /wp-admin/page-new.php Safari
    /wp-admin/async-upload.php Flash

    So, seems to me, user/pass credentials are not getting past Flash, and it is breaking. Makes sense, there should be no way apache is allowed to just suck the http auth out of the browser and shove it into flash. I suppose they could read it in with php, store it in a cookie, then have flash ask for it, but that seems downright dirty to me.

  12. cjane
    Member
    Posted 8 months ago #

    I managed to upload images but when I try to insert it to post, I get a blank white page.

    This is frustrating!

  13. alesh
    Member
    Posted 8 months ago #

    Same problem here... nothing works.

    A.

  14. avinews
    Member
    Posted 8 months ago #

    Well, I'm still at it.. I can upload pics, they get uploaded in the uploads folder, then in the gallery I can see the filenames including the recently uploaded files.

    but when I click 'Show' nothing happens. Also I think there should be somekind of a thumbnail in front of the filename? (doesn't show) and clicking the empty spot results in nothing..

    Everything functions as it should, even the automated plugin updates (cool!)

    But the only way to get pics into a post is by filling in the pic's URL directly.

    Why havent we heard from a more 'official' wordpress associate? this problem is not just a little thing is it?

  15. cjane
    Member
    Posted 8 months ago #

    I added this code into my .htaccess

    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    ..it seems to make my image uploading/insert to post work now.

  16. ruigato
    Member
    Posted 8 months ago #

    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    fixed the problem for me.

  17. tagged
    Member
    Posted 8 months ago #

    Try disabling bad behavior if you are running it. If you look at the upload POST it's reporting that "Shockwave Flash" is the useragent.

    I think this is triggering bad behavior. When I turn off bad behavior it works.

    Nothing else here worked. I don't think I even have mod_sec.

  18. tagged
    Member
    Posted 8 months ago #

    Yes, I even see the blocked entries in the bad behavior DB... nice.

  19. tagged
    Member
    Posted 8 months ago #

    "Shockwave Flash", // spam harvester

    That is in /wp-content/plugins/bad-behavior/bad-behavior/blacklist.inc.php

    Removing it correct the bad-behavior issue, although a fix from them would probably be best! Or a fix to WP, so it sends a decent UA.

    Thanks.

  20. art4mad
    Member
    Posted 8 months ago #

    I upgraded to 2.5 and my image uploaded is broken as many have described. I have tried all the .htaccess solutions here to no avail. I have one .htaccess file in the root directory of my entire website, of which there is a /blog directory wherein resides all my WP files. Thus my dirctory structure is www.tomrichmond.com/blog/<all wordpress files>. Adding any of the many .htaccess codes listed above make the blog inaccessable with a 500 Internal Server Error error (Apache/1.3.41 Server at www.tomrichmond.com Port 80). No fixes seem to work. My images upload to wp-content/images.

    I have every limited programming knowlegde and stuff like chmod, 770 and making sure my directories are "writable" I do not understand.

    My blog is almost unusable without the ability to upload images internally. I can "get around" that using FTP and URL image placement, but what a huge disappointment. Is there a link to a detailed explanation of steps to fix this problem for idiots like myself?

  21. tagged
    Member
    Posted 8 months ago #

    You running bad behavior plugin? If not try setting the path in settings->misc to the full path.

    Other than that, open a ticket with WP or something. sorry.

  22. art4mad
    Member
    Posted 8 months ago #

    Nope, no "Bad Behavior". I also deactivated all my plug-ins and tried to no avail. I also tried the full path thing, but perhaps I did it wrong. Should I then erase the entry above? I entered fullpath with http://www.etc but still no love. Busted.

    Can you open a support ticket when you self host your WP blog?

  23. tagged
    Member
    Posted 8 months ago #

    You can put in a bug report. You may want to check your error logs, or have your host do it.

    There seems to be a variety of problems. The full path is the path /home/blah/blog/ whatever your path might be.

  24. buzz
    Member
    Posted 8 months ago #

    This just keeps getting more bizarre. I've found that I can upload video files (avi, mgep and wmv so far), but anything else gives me the "An error occurred in the upload. Please try again later." message. This goes for images files (gif, jpg), pdf, and mp3 (I did get one mp3 to upload, but that was through the "add video" button.

  25. avinews
    Member
    Posted 8 months ago #

    @cjane
    Where is your htacces file placed?
    is it in your wordpress root folder, or in the website root?
    After upgrade (and probably before) I had no htacces file so I created one. But I'm not sure if it's in the right folder/root

  26. art4mad
    Member
    Posted 8 months ago #

    Where is your htacces file placed?
    is it in your wordpress root folder, or in the website root?

    The website root. If I place it in the WP root (/blog) I get the 500 error message.

  27. avinews
    Member
    Posted 8 months ago #

    Thanks art4mad

    I'll try it, let see what it does.

  28. alesh
    Member
    Posted 8 months ago #

    hmm fixed... i wonder how many people made the same mistake (as me):
    http://wordpress.org/support/topic/164348?replies=15

  29. art4mad
    Member
    Posted 8 months ago #

    I always replace all the folders except the wp-config. In fact, I always delete all the files first, then upload the fresh ones just to be sure there is no overwriting problems. Glad to hear that fixed you issues but I am still unable to upload images. Obviously there are many issues producing a similar eror here.

  30. webartz
    Member
    Posted 8 months ago #

    Hello, today I uppdated my WP Blog to version 2.5, and I have same problem to upload a image. When I upload a image file, show me a http error... I tried to change .htaccess file, and its OK, files was uploaded, but when i insert into post, dont show me my uploaded image, because have another problem, all images have a bug on path to file, my upload dir is www.my-site.com/wp-content/uploads/ but when I insert into post the path write on post to image is www.my-site.com/wp-admin/wp-content/uploads/. I dont know what's happend.

    I tried to use on htaccess file:
    SetEnvIfNoCase Request_URI ^/wp-admin/async-upload.php$ MODSEC_ENABLE=Off
    AND

    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    AND

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

    But no ones works fine. Somebody can help me !??

Reply »

You must log in to post.

About this Topic