简体   繁体   English

Magento图像未在前端显示

[英]Magento images not displaying in front end

I can see images in the back end. 我可以在后端看到图像。 On the front end of the catalog, no images appear for products, just the default "Image Not Found" icon. 在目录的前端,没有产品的图像,只有默认的“未找到图像”图标。

Images definitely exist, eg 图片确实存在,例如

media/catalog/product/f/o/foo.jpg 媒体/目录/产品/ F / O / foo.jpg

They also appear to be correct in MySQL: 它们在MySQL中似乎也是正确的:

|        4 |           77 |       248 | /f/o/foo.jpg              |

I've cleared all MAgento's caches several times, even restarted the web server. 我已经多次清除了所有MAgento的缓存,甚至重新启动了Web服务器。 It is not caused by the web server cache; 它不是由Web服务器缓存引起的。 I've disabled that. 我已经禁用了。 I even got a little desperate, ran the web server as root and chowned everything to 777, and uploaded new images, still nothing in the front end. 我什至有些绝望,以root身份运行Web服务器,将所有内容都塞给777,然后上传了新图像,但前端仍然没有任何内容。 I've followed everything I could find on Google and still nothing. 我一直在跟踪我在Google上可以找到的所有内容,但仍然一无所获。

My web server is running php 5.3.2 with GD, it meets all Magento's requirements AFAICT. 我的Web服务器在GD上运行php 5.3.2,它满足了Magento的所有AFAICT要求。

Loaded PHP modules: 加载的PHP模块:

[PHP Modules]
apc
Core
ctype
curl
date
dba
dom
ereg
fileinfo
filter
gd
gettext
hash
iconv
json
libxml
mbstring
mcrypt
mysql
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
SPL
SQLite
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib

[Zend Modules]

The last time I saw this problem, the issue was that the webserver didn't have enough memory. 我上次看到此问题时,问题是Web服务器没有足够的内存。 Magento checks to see whether it has enough memory to create the new image w/ GD before creating it, and will use the default image instead if this isn't the case. Magento在创建新映像之前先检查它是否有足够的内存来创建带有GD的新映像,如果不是这种情况,它将使用默认映像。 Try increasing the memory available to PHP and see if it solves the problem. 尝试增加PHP可用的内存,看看是否可以解决问题。

Hope that helps! 希望有帮助!

Thanks, Joe 谢谢乔

Just Rename your .htaccess file inside the /media directory to .htaccess-old. 只需将/ media目录中的.htaccess文件重命名为.htaccess-old。 This will absolutely resolve your image issue. 这将完全解决您的图像问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM