Magento WizardWelcome to the Number 1 Magento Hosting website.

Contact the site  Make Money

Image Upload Failure on Magento Product Page

 Add to Favourites  
(+3 rating, 9 votes)
Loading ... Loading ...

We’ve have been informed of a problem in the Magento back-end, whereby users’ are having problems trying to upload images to a product. Unlike another error where the user cannot see the browse box after clicking “Browse” – this time, users are able to browse for the image and upload it – however the image just simply add itself to the image list.

Similarly, you may also find that if anything is clicked (aside from the left colun links), you may be booted out to the admin login screen. Once you re-log in you’ll find that image is nowhere to be seen – despite the fact that five seconds ago it says it was “uploaded”!

Firstly, make sure your media directory is Chmod’ed in FTP to 777, and similarly that all files in your Magento installation have the correct “owner” for the hosting account – ie: not “root”.

Secondly, the error could well be your PHP installation. You may simply need to create a php.ini file in your Magento folder which reads as follows:

1
2
3
4
magic_quotes_gpc = off
short_open_tag = on
extension=pdo.so
extension=pdo_mysql.so

If you do this and also ensure Safe Mode is enabled, you should successfully be able to upload images again!

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • LinkedIn
  • Live
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis

about the author

    This article was written by Sam Davis on January 14, 2009.
    Computing over a glass of Grenache Shiraz... again!
    Sam is the Editor of Blasted Thing. Contact Us

related articles

 Product Tags on Product Page - Video Guide
 Template Path Hints - Video Guide
 Disable Cache while developing your site - Video Guide
 Import/Export Data with Profiles - Video Guide
 Google Base Integration - Video Guide

comments

35 Responses to “Image Upload Failure on Magento Product Page”

  1. Wil Linssen on April 23rd, 2009

    I could kiss you. I’ve been struggling with this forever, and the php.ini file fixed it. Thanks!

  2. Anil Solanki on June 27th, 2009

    hello sir
    I m using php version 5.2 and i have also upload the php.ini file to change the magic_quotes_gpc = off
    short_open_tag = on
    extension=pdo.so
    extension=pdo_mysql.so

    but still now i m not able to upload the products image in magento if u have an solution to short out please send me mail as soon possible
    thanks
    with regards
    anil solanki

  3. maone on July 17th, 2009

    Working Great, Thanks so much. is that should i change the attribute to 755 again ?

  4. Anis on September 18th, 2009

    It Works, great man…. it was eating and your solution really worked… thanks…

  5. Raphael on October 23rd, 2009

    Hey guys!
    I couldn’t get it to work.
    I have tried everything from all the foruns: chmod 777, php.ini, uninstall flash player 10 and install 9, use IE 6 and 7, chrome, firefox, tried in xp and vista.
    I have done it all. The php error while trying to upload a product image still shows up.
    PLEASE!
    If anyone has a way to make it work, please tell me!
    I have this very important client and cant show the image products. I have spent mora than 30 hours reading foruns and testing stuff.

    My e-mail is raphael@vexelweb.com.br

    Thank you guys!!

  6. Grant on November 9th, 2009

    I am having this exact same problem, but the PHP settings and permissions all seem to be correct.

    Any suggestions would be most appreciated.

  7. Samuel on November 17th, 2009

    Dont work… i have try everything you say and its not working please update your post

  8. Shaun on November 18th, 2009

    Same problem for us and I cannot find anyone to help……great! If anyone can help I’d appreciate it.

  9. David on December 2nd, 2009

    Additional to not being able to upload additional images to products the magento system won’t delete existing images. Any ideas?

  10. steve on January 13th, 2010

    wowwwwwwwwwww Thanks!!!!!!!!!!!! u r a pro!!!

  11. sven on February 8th, 2010

    That’s all very well, It works! BUT were can we find these uploaded images in the back-end AND how to delete these files whenever they’re uploaded and used… I can’t find nor delete them… I can see the link to the file bud not where it been uploaded to (FTP file). when I have like 20 file uploaded, eachc about 20Mb, than I’ve got problems… (quota) …

    We are a small printing company

    How to fix?

  12. Johannes on June 23rd, 2010

    I had the exact same problem and none of the suggested solutions worked for me. I then tried using Chrome 5 instead of IE 8, and there it worked perfectly. I have no idea why, but I have not changed into managing the store using Chrome.

  13. Edwin Lam on July 10th, 2010
  14. Pravin on July 13th, 2010

    Thats coooooooooooooool, thank you very much!

  15. Amit Patekar on July 13th, 2010

    Wow Amazing, php.ini solution worked, now the image upload problem solved in magento, cool thanks

  16. CJ on September 23rd, 2010

    @ sven on February 8th, 2010

    backend for file

    publichtml/media/custom_options/order/c/u/

  17. Roy Vincent on October 5th, 2010

    Thank You So MucH !!!!!!!!!!!

  18. Scott on January 23rd, 2011

    Thank you, Sam. You solved my 48 hour headache in seconds.

  19. Chetan on June 23rd, 2011

    Hello
    I am unable to upload image in magento . i have set this configuration
    magic_quotes_gpc = off
    short_open_tag = on
    extension=pdo.so
    extension=pdo_mysql.so

    Note : It is not working . please solve my problem as soon as possible on my mail
    Thanks

  20. Erin on July 15th, 2011

    Tried this solution, didn’t work. Did this image problem just start happening suddenly for anyone else? I was in the middle of uploading images and it worked fine then all of a sudden stopped. Did anyone else figure this out?

    Help!!

  21. Manel on August 5th, 2011

    Try with: in the htacess of media

    #Options -ExecCGI

  22. vasanth on August 27th, 2011

    changed like this

    magic_quotes_gpc = off
    short_open_tag = on

    same problem raised.”File was not uploaded”.
    Any cache folder problem…i used IIS server….
    kindly give any solution………

  23. vasanth on September 3rd, 2011

    :) I got the solution!!!!!….There is problem in the c:/windows/Temp permission problem…… “C:\Windows\Temp” /T /grant “User PHP Runs As”:RWMD……
    This link is helpful to fix the problem.
    http://www.phpfreaks.com/forums/index.php?topic=255177.0

  24. mrdon on September 5th, 2011

    I have done all these steps but nothing is working.Still I am unable to upload images.Kindly help me.

  25. mrdon on September 8th, 2011

    Tried this but it did not help me.

  26. Sivabalan on September 30th, 2011

    Guys!!

    Just enable Use SID on Frontend from Session Validation Settings under Admin->Configuration->Web

    Thats it.

    Cheers!!!!!!!!!!!!!

  27. Sathishraj on October 20th, 2011

    go to the php.ini and put this line Code:
    suhosin.session.cryptua =Off.

    Thanks,
    Sathish

  28. DaveCKW on October 25th, 2011

    Just Rename your .htaccess file inside the /media directory to .htaccess-old. This will absolutely resolve your image issue.

  29. Matthew Hansberry on November 11th, 2011

    Check to see if your fcgid.conf needs to be modified to increase the FcgidMaxRequestLen value. It is located in /etc/httpd/conf.d. Hope this helps..

  30. Vipin on November 11th, 2011

    Thank you Sathishraj . This resolved my problem with which i have been struggling for hours.

    Many Thanks
    Vipin

  31. Budi on November 15th, 2011

    Firstly, make sure your media directory is Chmod’ed in FTP to 777, and similarly that all files in your Magento installation have the correct “owner” for the hosting account – ie: not “root”.

    Ask: How do we check if media directory is Chmod’ed in FTP to 777?

    Secondly, the error could well be your PHP installation. You may simply need to create a php.ini file in your Magento folder which reads as follows:

    Ask: At what directory we should put php.ini?

    Sorry for the noob question, new in web tune up :)

  32. Ben on November 21st, 2011

    Magento flash uploader is using Flex 3 adobe flash uploader, and all the files are put into the folder called /media/tmp/ so you need to make media/ 777 and media/tmp/ 777 to allow apache to write file in there, and when you save the product actually it will move the file in tmp to the media/catalog/product/x/x/xxxx.jpg that means catalog/product all need to be 777. The “HTTP ERROR” will be the permission error at this moment, but can be a issue with MAC.

  33. Suleman on January 17th, 2012

    sometime it happens because of prototype.js file go to megento root folder and then to js folder and then find prototype.js file rename is with prototyp-old.js and download latest three version from http://www.prototypejs.org/ and replace one by one. one should work for you.

    Note: when replace file after that clear your browser cache to get new file.

    Enjoy!

  34. Jose on February 9th, 2012

    This totally worked. I was killing myself. rename the .htaccess file.

  35. NIsha on April 30th, 2012

    I have tried above all lthe things on our server. Our server is windows server.

    But getting same error “file was not uploaded”.

    can you please help me??

Leave a Reply




Spam protection by WP Captcha-Free


Export List of Magento Orders in CSV Format

  • Sponsored Ads

  • Magento Themes
    • baljit: pls helps me gateway error :transction is not accepeted...
  • Recent Tweets

    RT @NewQuest_WAA: #NewQuest #Recrute : Un Freelance Magento pour une mission #Cool avec des gens #Sympas !!! http://t.co/lCue1vZ4Ps

    #javascript magento Sextoy Adult store to finish by tatzianarose: I have an online magento Sextoy dropshipper ... http://t.co/l7jivVyjgY

    @JennyLewis99 so ur guide 4 all the things on web! can u pls tell me y @magento is recommended for ecommerce websites compared to others?

    @sakurokkk お、やっと帰ってきたなァ。お疲れさん

    RT @outlawyachtclub: Another wonderful wine and cheese soiree 12th June - Tickets available here http://t.co/POzOJEl6cr