Magento 未在某些商店的缓存中生成图像
我在 3 个不同的商店中使用 Magento 1.5(相同的产品,但针对不同的受众等)。对于其中一个商店(添加的第二个商店),小图像、缩略图等在缓存目录中生成。对于其他人,不会生成图像(尽管目录结构是,因此权限设置正确)。 有谁知道这是否是其他两家商店的设置错误?
I'm using Magento 1.5 with 3 different stores (same products, though targetted at different audiences etc). For one of the stores (the second store that was added), the small_images, thumbnails etc are generated in the cache directory. For the others, the images are not generated (although the directory structure is, so the permissions are set correctly).
Anybody know if this is a setting that is wrong in the other two stores?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
这里的问题是,每次清除缓存或添加新图像时,Magento 都会以“apache”用户身份创建/添加目录,这会阻止它在加载页面时写入生成的图像。
如果每次访问 Magento 中的不同页面(购物车、产品详细信息页面、主页)时从安装的根目录运行此命令,应该没问题。除此之外,我仍在寻找解决方案:
应该可以。
The issue here is that each time you clear your cache or add a new image, Magento wants to create/add directories as the "apache" user, which prevents it from writing the generated images upon loading a page.
If you run this from the root of your install each time you visit the different pages in Magento (cart, product detail page, main page), you should be ok. Other than that, I'm still looking for a fix:
That should do it.
将 php 内存限制设置为 256 MB 之类的...这是因为服务器没有足够的内存来正确管理整个缓存重建(刷新)
Set up the php memory limit to something like 256 MB ... it is because the server does not have enough memory to properly manage the whole cache rebuild (flush)
请从您的站点根目录通过 ssh 尝试以下操作。这会恢复之前丢失的图像和缓存图像。
Please try the following via ssh from your site root. This brought back images and cache images that were previous missing.
我有完全相同的问题,我通过删除 .../media/catalog/product/ 下的“cache”文件夹解决了问题,
我不知道这是否是一个持久的解决方案,但它现在有效。请注意,我必须刷新所有 magento 缓存并刷新页面多次才能看到更改。希望它能帮助某人。
I have exactly the same issue i solved the problem by deleting the "cache" folder under .../media/catalog/product/
I dont know if it will be a durable solution but it works for now. Note that I had to flush all magento caches and refresh several times my pages to see the changes. Hope it will help someone.
就我而言,媒体/目录/产品中的缓存文件夹完全丢失。我创建了它,然后在该文件夹上 chmod 775(755 对我不起作用,因为我有权访问的用户位于组中,因此需要组可写)。如果您以在服务器上运行 apache 的同一用户创建该文件夹,则 755 应该可以工作。
In my case the cache folder in media/catalog/product was missing entirely. I created it, then
chmod 775
on the folder (755 didn't work for me because the user I have access to is in the group, so it needed to be group writable). 755 should work if you created the folder as the same user that runs apache on the server.