I just updated my magento 1.7.0.2 store to the latest SUPEE patches and shortly after when I was adding a new product to my site I found that something was wrong. When I upload a new image the jpg/png file won't preview like it used to. The exisiting images on other products load and preview when I place my cursor over them, but new images just give me the no preview icon. Where do I start to look here?
Solved! Go to Solution.
Hi @smiller13,
I have not seen this issue myself, but there were some permission changes to the /media folder which could be affecting it.
Have you checked the permissions of the directory?
There is a lot of useful info on the permissions of the media folder and files beneath it on this post that may help:
Hello,
You update the latest SUPEE 7405? With SUPEE 7405, it replace
#lib/Varien/File/Uploader.php
chmod($destinationFile, 0777);
With
chmod($destinationFile, 0640);
You try to set 0644
chmod($destinationFile, 0644);
You can read more here: http://magento.stackexchange.com/a/99124/33057
Hi @smiller13,
I have not seen this issue myself, but there were some permission changes to the /media folder which could be affecting it.
Have you checked the permissions of the directory?
There is a lot of useful info on the permissions of the media folder and files beneath it on this post that may help:
Hello,
You update the latest SUPEE 7405? With SUPEE 7405, it replace
#lib/Varien/File/Uploader.php
chmod($destinationFile, 0777);
With
chmod($destinationFile, 0640);
You try to set 0644
chmod($destinationFile, 0644);
You can read more here: http://magento.stackexchange.com/a/99124/33057
Ack! Who the hell came up with the great idea to save files using 640 privileges? For many virtual servers, users logged in are in same group with PHP while web server runs as "other" or "world". Once you save something using PHP it automatically becomes unreadable to web server unless someone changes privileges.
Also, modifying this .php file is not a a good idea in long term as it is core file. Either write an extension or complain loudly. Maybe Magento hears our pain and does something.
Yeah that fixed it. Permission problems. Either have to modify it manually or change the core code which I don't like to do. I'll wait and see if Varien does an update fix.
Thanks for the help guys!
Hello,
Magento has just release new path for your issue-SUPEE-7405 v1.1. https://www.magentocommerce.com/download