简体   繁体   English

将magento存储移动到新服务器 - 1.3.2.4 - 不加载产品映像

[英]Moving a magento store to a new server - 1.3.2.4 - product images do not load

I am helping a friend move a store to a new server, but I am running into a problem at the moment. 我正在帮朋友将商店搬到新服务器,但我现在遇到了问题。 I have copied the DB and the files to the new server (since the store uses a personal theme and also some personal extensions. 我已将数据库和文件复制到新服务器(因为商店使用个人主题和一些个人扩展。

I have updated core_flag to change web_unsecure_url and web_secure_url, and have updated local.xml and config.xml in /app/etc. 我更新了core_flag以更改web_unsecure_url和web_secure_url,并更新了/ app / etc中的local.xml和config.xml。 I also cleared the image cache, and this is where the problem seems to start. 我也清除了图像缓存,这就是问题似乎开始的地方。

Here is what the store looks like right now: 184.170.141.77. 这是商店现在的样子:184.170.141.77。 As you can see, a part of the page loads up correctly, but not the blocks and the the images in the media folder, and it seems like once the theme tries to insert an tag in the page, everything stops loading. 正如您所看到的,页面的一部分正确加载,而不是媒体文件夹中的块和图像,似乎一旦主题尝试在页面中插入标记,一切都会停止加载。 All the images load up perfectly in the backend though. 尽管如此,所有图像都完美地加载在后端。

I looked at the apache error log, nothing comes up. 我查看了apache错误日志,没有出现任何问题。 I also tried disabling cache, this does not change anything. 我也试过禁用缓存,这不会改变任何东西。 I have also tried to desactivate all the products and reactivate them, this does nothing also. 我也尝试停用所有产品并重新激活它们,这也没有做任何事情。

Looking at the script panel in firebug, this is what I find: 查看firebug中的脚本面板,这是我发现的:

   <div class="listing-type-list catalog-listing">
   <div class="listing-item">
   <div class="product-image">
   <a href="http://184.170.141.77/graines-exotiques/graines-abutilon-megapotamicum-graines-drapeau-belge.html" title="">
    <img src="

The page seems to stop loading everything once it encounters what would be the link for the image. 一旦遇到图像的链接,页面似乎停止加载所有内容。 Looking in the theme list file list.phtml, this is where the problem seems to be: 查看主题列表文件list.phtml,这就是问题所在:

<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>" width="135" height="135" alt="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" />

Yet this is the exact same thing as in the default folder. 然而,这与默认文件夹中的完全相同。

I have checked the permissions on the folders, everything seems correct. 我已经检查了文件夹的权限,一切似乎都正确。 I have then changed the src for : 然后我改变了src:

<?php echo $_product->getSmallImage(); ?>

While this does not load any images, at least all items appear on the page. 虽然这不会加载任何图像,但至少所有项目都会显示在页面上。 I have also tried with this line: 我也尝试过这一行:

Mage::helper('catalog/image')->init($_product, 'image')->resize(135,135)

But I get the same result as with the original code. 但是我得到与原始代码相同的结果。

Does anyone know what could be the cause of this problem? 有谁知道这个问题可能是什么原因?

Thanks for your help. 谢谢你的帮助。

although this questions is nearly one year old, I want to answer it. 虽然这个问题差不多有一年了,但我想回答一下。

As I had the same problem, I found out that php5-gd was not installed on the new server. 由于我遇到同样的问题,我发现新服务器上没有安装php5-gd。

So the quick and easy solution is eg. 因此,快速简便的解决方案就是例如。 for Debian systems: 对于Debian系统:

apt-get install php5-gd

For CentOS/Fedora/Redhat systems: 对于CentOS / Fedora / Redhat系统:

yum install php-gd

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

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