I migrated a Magento instance from one host to another, and in the process earnt myself some free beer; everything went well, apart from some of the thumbnail images not appearing. The image URLs would look like :
/media/catalog/product/cache/1/image/5e06319eda06f020e43594a9c230972d/images/catalog/product/placeholder/image.jpg
Things tried which didn’t help :
- rebuilding various Magento image caches and so on (login as admin -> System -> Cache management).
- Check PHP’s memory limit… (512mb… shouldn’t be a problem!)
- Check permissions on the media directory (chown -R www-data media .. didn’t fix it)
- Check PHP has gd installed/enabled – yes.
- Disable suhosin (no change)
- Check PHP logs (nothing relevant)
- Check Apache logs (nothing relevant)
- Changing the product to use a different thumbnail etc image (didn’t help)
I already knew the original host didn’t have a case sensitive file system, and this was partially fixed this using mod_speling in Apache, but this obviously doesn’t help when e.g. PHP decides to read and resize an image file.
I then tried comparing the contents in media/catalog/product with what’s in the catalog_product_entity_varchar table. So, in my case :
select value from catalog_product_entity_varchar where value like '/F%' limit 1;
returned something like :
/f/i/file_4_1.jpg
And looking in the above mentioned directory, only showed a directory called F. Simple fix… :
mv F f
(Obviously check the table doesn’t make reference to images with /F in them…. Β in my case it didn’t.)
<<reload web browser; images all appear and everything works.>>
What sort of idiot created case insensitive filesystems… grr.
Still, at least people can now browse online for Kitchens …. and see the appropriate thumbnails.