0
votes

I have transfered my magento from old host to a new host. Everything is running ok except to the product's images. I found that Magento is unable to generate image Cache folder under media/catalog/product/cache. I have followed all solutions on the internet but I couldn't find a solution. This is what I have done so far.

  1. Change permission to 777 and double check on owner and group for Cache folder under media/catalog/product/cache and var/cache but nothing change.
  2. Reindex data, clean cache, regenerate image cache million of times.
  3. Double check for GD installation
  4. Double check disk space. I still have about 4G.
  5. Delete any .htaccess under that folder.

I spend a lot of time to check and try, check and try again but nothing work.

Could anyone please help me to solve this problem

4
does it show any error message? Could you please try moving your cache folder to other location (just rename it) to see if the folder got created - William Tran
Hi William, Thank you for your reply, I have moved it, renamed it, deleted it and even create an empty cache folder with permission 777. But nothing happen - Ty Trinh
My best advice would be to debug through this method: echo Mage::helper('catalog/image')->init($products, 'small_image')->resize(200,200); - William Tran
had to change owner of media/catalog/product/cache from apache to root - user3338098

4 Answers

2
votes

You need media/tmp as well. If it's not present at the moment, create it.

 $ cd /path/to/your/magentoRoot/
 $ mkdir media/tmp
 $ chmod 777 media/tmp

Additionally, make sure www-data or any other user that runs the web (nginx / apache2 or php-fpm processes) can at least read and write to the whole media/ folder.

0
votes

Move and replace media folder from old host to new host. It will probably be get all your product images.

0
votes

Please check the maximum memory size in php-fpm and php.ini file if it is -1 than set to 1024Mb

0
votes

This happened to me on copying a live site onto a local Fedora Linux machine to test out an upgrade process. Issues are likely to be related to the Apache server not having permissions to write. So be aware of SELinux preventing Apache writing to the file system and also that your Magento files are writable by the Apache user.