WordPress.org

Ready to get started?Download WordPress

Forums

125

2.5 image upload (146 posts)

  1. jayvdc
    Member
    Posted 6 years ago #

    ok i have chmod'd my directories and blah blah. anytime i try and upload an image from my computer to insert in a post i get this error.

    "http error"

    and then it says in the image uploader "An error occurred in the upload. Please try again later."

    i am lost as to why this is happening. i have been using wordpress since the early days of 1 and i have never had this problem. it is also a fresh install of 2.5.

  2. jayvdc
    Member
    Posted 6 years ago #

    anyone?

  3. knightlore
    Member
    Posted 6 years ago #

    i have the same problem have tried everything to get it to work

  4. Downfall
    Member
    Posted 6 years ago #

    Sounds like an apache-related problem to me? I could be wrong, though. For me... I don't seem to have the problem at all, works fine :)

  5. sheikstanza
    Member
    Posted 6 years ago #

    None of the uploads seem to work to me. everytime it fails at the moment that the message that it's chunching the file appears (making a thumbnail and cannot write to the server maybe?) My host is also running apache...

  6. sheikstanza
    Member
    Posted 6 years ago #

    Here is the error log while i tried to post a picture on my weblog:

    [Fri Mar 21 10:37:00 2008] [error] [client 62.131.44.82] mod_security: Access denied with code 406. Error processing request body: Multipart: final boundary missing [severity "EMERGENCY"] [hostname "momento.stanzafoto.nl"] [uri "/wp-admin/async-upload.php"] [unique_id "OZX2lcGKnSYAACWrb04AAAAU"]

    Some people out here who can do anything with this information?

  7. beautyadvice
    Member
    Posted 6 years ago #

    the same problem ^_^

  8. Len
    Member
    Posted 6 years ago #

    I was having this same problem. For me, it got fixed when I went to the Settings -> Miscellaneous page and entered "Full URL path to files (optional)" (even though it was the same directory as "Store uploads in this folder.")

    For some reason, having the full URL to the upload directory seemed to help.

    This worked for me. Your mileage may vary. ;)

  9. Ronald Huereca
    Member
    Posted 6 years ago #

    I get the same error on RC1. Using Len's solution didn't work, although I could have done something wrong.

    I found this link, which may explain why some are having issues, but there is no solution presented.

    My domain is technically an add-on domain of an existing domain if that helps anyone debugging.

  10. Ronald Huereca
    Member
    Posted 6 years ago #

    My apologies for bumping this thread. Found the solution in the bug tracker.

    http://trac.wordpress.org/ticket/6278

    I added this line to my .htaccess (assuming your WP installation is at the root):

    SetEnvIfNoCase Request_URI ^/wp-admin/async-upload.php$ MODSEC_ENABLE=Off

  11. issy-m
    Member
    Posted 6 years ago #

    These solutions did not work for me

    Any other suggestions?

    Thanks

  12. GuruJi
    Member
    Posted 6 years ago #

    I am getting the same error.

    As ronalfy pointed out above, my wordpress is hosted on an add-on domain as well. Could that be a problem?

    In the next post, ronalfy points out the solution that (probably) worked for him. However, it is not working for my site. It's still giving me that error.

    Any solution?

    WP 2.5RC1

  13. GuruJi
    Member
    Posted 6 years ago #

    Oh and one clarification: I was trying to upload an audio file (not an image file). So it probably is giving error for uploading of any media type (through the new media uploading interface).

  14. RobTucker11
    Member
    Posted 6 years ago #

    I have tried the solutions listed above, however they are not providing a solution. Here is some other information that might be pertinant.

    I am running apache version 2.
    I have a feeling that the mod_security solution has just been working for apache 1.x users.

    I have tried setting the absolute upload path as well.

    My wordpress installation is in /wordpress/
    user.domain.com/wordpress/

    I have chmoded 777 and chowned appropriately just for testing purposes and have seen no difference.

    Can someone tell me how to disable the flash uploader just temporarily until this is resolved? Or even better offer up a working solution! Thanks!

  15. RobTucker11
    Member
    Posted 6 years ago #

    I ran another test and it resolved the issue for me.

    I rearranged the dns of my site so instead of the url being a sub domain it is now top level and the upload is working.
    Old url was user.domain.com now it is just domain.com . It is actually a flaw with the flash uploader and not word press. Hopefully this can help others having the same problem.

  16. issy-m
    Member
    Posted 6 years ago #

    Hey guys, I got it to work!!

    Add this to your .htaccess file

    <IfModule mod_security.c>
    SetEnvIfNoCase Content-Type \
    "^multipart/form-data;" "MODSEC_NOPOSTBUFFERING=Do not buffer file uploads"
    </IfModule>

    <IfModule mod_gzip.c>
    mod_gzip_on No
    </IfModule>

    Thanks a lot to Phil. http://permalink.gmane.org/gmane.comp.web.wordpress.testers/6706

  17. GuruJi
    Member
    Posted 6 years ago #

    Thanks issy-m for posting a workable solution. It works like a charm.

    Remember to set the uploads folder to 777.

  18. sheikstanza
    Member
    Posted 6 years ago #

    I also got it to work. Take a look over here how to disable mod_security in the wordpress directory using .htaccess

    http://www.vbulletin.com/forum/showthread.php?t=197290

  19. RyanWilliams
    Member
    Posted 6 years ago #

    Disabling mod_security using that guide will fail if your host is using Apache 2.x, which many are. The .htaccess trick does work for Apache 2.x hosts though, I'm pleased to confirm. :)

  20. imgiseverything
    Member
    Posted 6 years ago #

    I've been struggling with this problem all day.

    problem occurs on my local server OSX/PHP5/Apache2 and with Dreamhost.

    the .htaccess fix (above) doesn't seem to work on either server all I can get out of the swfupload debug setting is that is is sending back a 500 error. This must be a problem with swfupload/server setting -there seems to be a few complaints in swfupload forums but not solutions.

  21. RyanWilliams
    Member
    Posted 6 years ago #

    I just want to clari`fy that this is the code which let me use the uploader on an Apache 2.x host:

    <IfModule mod_security.c>
    SetEnvIfNoCase Content-Type \
    "^multipart/form-data;" "MODSEC_NOPOSTBUFFERING=Do not buffer file uploads"
    </IfModule>

    Really though, there're so many server variations it could be any number of things. This just happens to be what worked for me.

  22. BrandiBoyd
    Member
    Posted 6 years ago #

    Same problem, for RC1 yesterday and 2, today. Have tried all the listed solutions in this and other threads unsucessfully- .htaccess rules, permissions and chmods are all right. Haven't tried the DNS fix but that's next.
    I'm running Apache version 1.3.34 (Unix) and PHP version 4.4.1 and mod_security is on- but no- the mod security fixes have not worked for me.

    In FF on win vista I get HTTP Error/An error occurred in the upload. Please try again later.
    - my error log shows :
    /wp-admin/async-upload.php
    Http Code: 503 Date: Mar 26 16:15:42 Http Version: HTTP/1.1 Size in Bytes: 1893
    Referer: -
    Agent: Shockwave Flash

    In IE7 I get
    Specified file failed upload test.
    but the image does upload (but only the filename with a 'show' link that doesn't work shows in the upload dialogue) and the resized and thumb versions are created but also not shown in the upload dialogue. They do appear (as filenames) in the gallery tab but I can't insert the gallery or edit the title, etc. And they *are* on the server. But I cannot insert them into the post using the insert media/insert image links at all. When I click 'save all changes' I receive the error: "No File was uploaded" - although the number of files in the 'gallery' tab increases, and I can find the files in the uploads folder.

    I realize this is probably an issue with the SWFuploader and/or my server settings; but it seems like so many people are having this problem and there is no real fix, just a lot of guessing. Am I missing a conversation about it somewhere?

  23. issy-m
    Member
    Posted 6 years ago #

    There's just one thing. I do not see thumbs for my images, just text. I look more into this.

  24. BrandiBoyd
    Member
    Posted 6 years ago #

    Okay...
    This didn't fix it but did produce something different.
    In past attempts I was trying to add photos to a post I had not yet manually saved by clicking save (even though autosave was working away).
    I decided to try it on a saved post, and WAS able to see the upload progress, which I never did see before, and it did pause longer this time as if it was uploading the file.
    I still got the HTTP error and my log still shows the 503. :|

  25. BrandiBoyd
    Member
    Posted 6 years ago #

    Ok, so I did a few things and sort of have my upload working.
    First I went and enabled php5 on my server, my host offers it but not by default...:/
    And then I disabled mod security alltogether.
    Neither worked alone or together in either FF or IE. I left the php5 on :) and took out the mod security off until I know what the fix is.

    I'm playing with the RC on a (currently) development domain, fresh install and what not; using the kubrick theme.

    Then, just toying around, I got the upload to ALMOST work in FF in a very hackneyed sort of way...
    1. I made and published a post with no uploads (scripts enabled for the domain of course)
    2. Then I went back and edited the post, clicked add photos,
    3. and then disabled scripts (thanks noscript!) before choosing a file and uploading. The upload lightbox pane becomes a page now, and takes you away from the edit pane.
    The image uploaded, no error but then the 'show' links wouldn't work ; so I
    4. re-enabled scripts.
    I was able to click and expand the 'show' link and edit the file properties in the gallery tab, but not in the single file/upload tab.
    5. So I edited a few things in the gallery tab and clicked save changes,
    6. moved over to the upload tab, and clicked the 'insert into post' button that is in the insert image by URL feild.
    This returned a blank page when the form submitted.
    7. I looked at the post and the title, link, and alt description were there, but no image in the excerpt on my main blog page, and when I went to the single post, I had this :

    Warning: array_values() [function.array-values]: The argument should be an array in /home/june/public_html/wp-includes/media.php on line 429

    Warning: Invalid argument supplied for foreach() in /home/june/public_html/wp-includes/media.php on line 431

    Warning: array_values() [function.array-values]: The argument should be an array in /home/june/public_html/wp-includes/media.php on line 429

    Warning: Invalid argument supplied for foreach() in /home/june/public_html/wp-includes/media.php on line 431

    And the source returned for the single post (using the kubrick default theme) was this:

    <div class="post" id="post-14">	<h2>
    <a href="http://devdomain.com/2008/03/help-me/">help me!</a> &raquo; Test image</h2>
    <div class="entry">
    <p class="attachment">
    <a href='site/wp-content/uploads/2008/03/04500080.jpg' title='Test image'><img src="site/
    wp-content/uploads/2008/03/04500080-200x300.jpg" width="200" height="300" class="attachment-medium" /></a>
    test image
    <div class="navigation">
    <div class="alignleft">
    <b>Warning</b>:  array_values() [<a
    href='function.array-values'>function.array-values</a>]:
    The argument should be an array in
    <b>/home/site/public_html/wp-includes/media.php</b>
    on line <b>429</b>
    
    <b>Warning</b>:  Invalid argument supplied for foreach()
    in <b>/home/site/public_html/wp-includes/media.php</b>
     on line <b>431</b>
    </div>
    <div class="alignright">
    <b>Warning</b>:  array_values() [<a
    href='function.array-values'>function.array-values</a>]: The argument should be an array in
    <b>/home/site/public_html/wp-includes/media.php</b>
    on line <b>429</b>
    
    <b>Warning</b>:  Invalid argument supplied for foreach()
    in <b>/home/june/public_html/wp-includes/media.php</b>
    on line <b>431</b>
    </div>
    </div>
    <br class="clear" />

    I realize that is probably because I used the gallery tab, and only had one image. So I went back and tried the same procedure for another image, to make the gallery into an array. All went well, but no pictures...
    the post source this time was this (minus all the divs without errors):

    <a rel="attachment wp-att-14" href="http://call4pilotcars.com/2008/03/help-me/
    attachment/04500080/"> </a>

    only...no errors this time. And no gallery visible.
    I can't seem to get my code in there without the styling cutting it off at the end; I've tried to edit it a few times to no avail-if you can't read the source/error and need to, email me, I saved it.
    Don't know if that helps anyone, right now it just makes my head hurt. Maybe tomorrow.

  26. Zhu8
    Member
    Posted 6 years ago #

    /home/******/public_html/blog/.htaccess: Invalid command 'uploads"', perhaps mis-spelled or defined by a module not included in the server configuration
    That's my error log
    Store uploads in this folder:upload
    Full URL path to files (optional):/home/******/public_html/blog/upload
    That's my Miscellaneous Settings

    ..anyone help?

  27. RyanWilliams
    Member
    Posted 6 years ago #

    Sounds like your .htaccess has gotten corrupted and is interpreting your upload directory as a direct server command for some reason.

  28. BrandiBoyd
    Member
    Posted 6 years ago #

    I just wanted to add what did work for me.
    I'm running last nights' build, on Apache 1.3.34 with mod security..
    SetEnvIfNoCase Request_URI ^/wp-admin/async-upload.php$ MODSEC_ENABLE=Off
    I had tried this before without success, but not turned off my one plugin, Maintenance Mode- I'm chalking it up to a blonde day. Disabling that and using the line above worked for me perfectly in FF on Vista, will be testing on XP shortly. In IE, I don't have the ajax, the image does upload and increase the gallery count, but cannot get the 'show' links to work at all, so I can't insert anything.
    I'm still having other issues with the gallery feature and whatnot, but this did allow me to upload. Hope it helps.

  29. winddude
    Member
    Posted 6 years ago #

    I have no .htaccess file in my home directory....? and i definitively cannot get the uploads to work.

  30. dfunkydog
    Member
    Posted 6 years ago #

    The following solved my problem

    * create uploads folder manually, CHMOD to 775

    * enter Full URL path to files in settings->misc

    * add .htaccess with

    SetEnvIfNoCase Request_URI PATH-TO-WORDPRESS/wp-admin/async-upload.php$ MODSEC_ENABLE=Off

    hope it helps out

125

Topic Closed

This topic has been closed to new replies.

About this Topic