Support » Alpha/Beta/RC » 2.5 image upload

  • 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.

Viewing 15 replies - 16 through 30 (of 145 total)
  • Thanks issy-m for posting a workable solution. It works like a charm.

    Remember to set the uploads folder to 777.

    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

    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. 🙂

    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.

    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.

    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?

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

    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. 😐

    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.

    /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?

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

    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.

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

    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

    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…

Viewing 15 replies - 16 through 30 (of 145 total)
  • The topic ‘2.5 image upload’ is closed to new replies.