WordPress 2.5 image upload problem : SOLVED
hack, internet, mod, php, software, tutorial Add commentsThis afternoon I upgraded my blog to the latest version of wordpress, 2.5. The install went great and it was simple to do. I didn’t realize that I had any problems until I went to make a blog post and upload an image. When I tried to upload, I was greeted with the following:
Something was for sure messed it. I tried it in several browsers, but had the same results. no luck. I started to go some searching online but since wordpress 2.5 is so new, there was little info to be found. After about an hour of stumbeling around I came across a post on a forum where someone said they got the image upload to work by adjusting their .htaccess file on thier site with the following code.
<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>
I made the change to my .htaccess file, and like magic the image upload feature started to work again!
I am making this post in the hopes that other people with similar problems will stumble across this post and be able to fix their problem with out having to wade through all the pages of people trying to diagnose what the problem is when the solution is super easy.


March 31st, 2008 at 5:06 am
[...] Josh Highland’s Blog WordPress 2.5 image upload problem : SOLVED [...]
March 31st, 2008 at 1:35 pm
I’m getting the same error, but thus far the .htaccess solution hasn’t solved it for me. I actually have two .htaccess files, one in the root, one in /wordpress (a subset/copy of the data from the root problem) - I’ve edited both, but to no avail.
Any ideas?
April 1st, 2008 at 9:20 am
I had the same problem, but your tip worked fine for me. Thank you!
April 1st, 2008 at 10:11 am
[...] highlighted on Josh Highland’s [...]
April 1st, 2008 at 7:11 pm
Josh,
I tried your solution and the error message is now disappeared.
Unfortunately I get another error that says:
The uploaded file could not be moved to home/…/wp-content/uploads
I had tried to Add Full URL Path to Files at Settings/Misc to no avail.
I’m still surfing for answers …
April 1st, 2008 at 11:14 pm
make sure that the directory that you are uploading to has the proper settings. try chmod 666 or 777
April 2nd, 2008 at 1:51 pm
I don’t found .htaccess!!!
April 2nd, 2008 at 3:15 pm
Thanks a lot for this suggestion. It Works!!! I translate this post into spanish for the latinamerican community with your credits.
Good Luck
April 4th, 2008 at 11:45 am
Thanks, worked like magic.
lughdailh - if the file does not exist, create it in the wordpress root folder and put the code above in it.
April 6th, 2008 at 9:13 am
Thanks man,
It really works fine and all my problem vanished like anything.
April 8th, 2008 at 7:19 pm
for those who have their blog in a subdomain of an add-on domain, you have to insert the code to the .htaccess of the main domain. confused? no other way to make it any clearer. just figured this out for my subdomain blogs.
April 9th, 2008 at 8:15 am
thanks josh, you’re a life saver. I’m also spreading the word
April 9th, 2008 at 12:10 pm
Thanks Josh - nice quick fix.
April 10th, 2008 at 12:30 am
Hi Josh,
excellent work! you saved my day. just one question: in order to get your solution working i had to put it at the start of my .htacess-file. does this mean that the code after the tag will not work? Here’s my code in the .htacess-file:
# BEGIN WordPress
SecFilterEngine Off
SecFilterScanPOST Off
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
April 10th, 2008 at 12:31 am
sorry, not all of the code is displayed:
# BEGIN WordPress
i have left out the brakets
IfModule mod_security.c
Files async-upload.php
SecFilterEngine Off
SecFilterScanPOST Off
/Files
/IfModule
IfModule mod_rewrite.c
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
/IfModule
# END WordPress
April 12th, 2008 at 9:01 pm
Yes, this made my headache go away. I reinstalled all of wp 2.5 and that didn’t fix it originally, but this did. thanks a lot!!
April 13th, 2008 at 1:38 am
[...] Résoudre le souci de transfert des images via l’Image Uploader ! [...]
April 13th, 2008 at 3:44 pm
After trying all of the other fixes, this is the one that finally got it working. If your blog is not the root of your site, then the .htaccess file is in the root folder of your site.
April 14th, 2008 at 12:32 pm
[...] http://joshhighland.com/blog/2008/03/30/wordpress-25-image-upload-problem-solved/ [...]
April 17th, 2008 at 9:30 am
Thanks! Definitely helpful! I’m overall loving the new version of Wordpress, but this was an interesting bug.
April 20th, 2008 at 7:57 pm
I have tried all your solutions and I still get the following message after trying to upload an image, it is very frustrating. the htacess modifications do not work on my Mac running 10.5 in safari or FF.
Fatal error: Call to undefined function wp_constrain_dimensions() in /home2/newyorka/public_html/wp-admin/includes/image.php on line 173
any other suggestions?
April 20th, 2008 at 11:49 pm
@Sage:
I would make sure that wp-includes/media.php is uploaded. The function wp_constrain_dimensions() is defined in that file, and id needed for wp-admin/includes/image.php to work.
April 21st, 2008 at 6:49 am
Yes that file is loaded. it has the current date and I can view the file. One of the solutions I found on the web last night had me change a few lines in it to disable the flash component of the new WP image loader. I searched through the file , changed the lines of code and installed a plugin that was supposed to by pass the Flash loader. All failed and the upload error message was the same. So I deleted both the admin and includes folders from my server and re installed them from a fresh download of WP 2.5 and we are still unable to upload any media. I am thinking I should put the old 2.3 admin and includes folders in place but I did the database update and am concerned that the updated DB will not respond to the older versions. Any thoughts. Maybe I should replace the new media.php with an old one?
Thanks,
Sage
April 21st, 2008 at 10:04 am
Some things seem to have resolved but I am still having problems. I checked my uploads folder and was surprised to see almost 40 photos there that I had uploaded last night. Many duplicated of what I had been getting error messages for, I downloaded a few to make sure they were complete files and not just unpostable ghosts. I deleted the copies and when I opened WP again I found the photos in the Media library. I was able to make a post but when I needed a photo that was not in the Media space I uploaded it and it seemed to go in, however when I went to the media list it was an ikon with a ? in it. I checked the server and the file is complete and viewable but WP cannot find it.
While viewing the post one other photo became a ? and I had to find it again in the Media space. It had become a ? there too, and then it was back so I could repost it in an edit. WP 2.5 seems to be unstable. but one thing I noticed and appreciate is the automatic save while writing a draft. I tried to save and suddenly Safari could not get to the server. Had to restart the whole machine, then I found the draft and it was complete except for one sentence.
April 27th, 2008 at 11:45 am
Thanks for the fix! I was searching for a solution and found your site.
April 28th, 2008 at 8:35 pm
[...] The method suggested by Josh Highland’s and Hongkiat’s (Thanks guys for the tips) do not produce any result at all, well at least it [...]
April 30th, 2008 at 4:45 pm
Your post was spot on. My problem was solved from the inclusion of the code you posted. Thanks.
May 4th, 2008 at 9:09 am
I tried your tip, it didn’t work out for me. I used no-flash uploader plug-in!
May 7th, 2008 at 2:01 am
Thank you !! It worked !!
May 26th, 2008 at 12:18 am
hi,
if the /uploads/2008/05
is set to chmd 0777
then i can upload to it, HOWEVER, I’ve read this, “Directories should have permissions of 755. NEVER 777″
http://www.tamba2.org.uk/wordpress/chmod/
I fear having my directory set to 777. Please advise. Thank you.
June 26th, 2008 at 12:42 pm
[...] This first one is most likely to solve the problem and is from: http://joshhighland.com/blog/2008/03/30/wordpress-25-image-upload-problem-solved/ [...]
July 28th, 2008 at 4:04 am
[...] upload. Now I know there have been many, many, many, (well let’s just say a lot) of posts and articles about how to fix this problem. But, none of them seemed to work for me. Most of them just go into [...]