Magento 未在某些商店的缓存中生成图像

发布于 2024-11-07 21:53:35 字数 139 浏览 0 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

ぶ宁プ宁ぶ 2024-11-14 21:53:35

这里的问题是,每次清除缓存或添加新图像时,Magento 都会以“apache”用户身份创建/添加目录,这会阻止它在加载页面时写入生成的图像。

如果每次访问 Magento 中的不同页面(购物车、产品详细信息页面、主页)时从安装的根目录运行此命令,应该没问题。除此之外,我仍在寻找解决方案:

chown -R correctuser:correctgroup media/*

应该可以。

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:

chown -R correctuser:correctgroup media/*

That should do it.

池木 2024-11-14 21:53:35

将 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)

离去的眼神 2024-11-14 21:53:35

请从您的站点根目录通过 ssh 尝试以下操作。这会恢复之前丢失的图像和缓存图像。

chmod -R 777 media

Please try the following via ssh from your site root. This brought back images and cache images that were previous missing.

chmod -R 777 media
橘亓 2024-11-14 21:53:35

我有完全相同的问题,我通过删除 .../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.

我只土不豪 2024-11-14 21:53:35

就我而言,媒体/目录/产品中的缓存文件夹完全丢失。我创建了它,然后在该文件夹上 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文