打开购物车网站转移到另一台主机,图像损坏
我已将 Open Cart 网站转移到另一个域,但所有图像都已损坏,并且我无法进入管理。有理由吗?
我已经更改了配置数据库凭据。
I have transferred the Open Cart site over to another domain but all the images are broken adn I cannot get into admin. Is there a reason why?
I have changed the config database credentials.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
除了更改数据库凭据之外,您还必须更改
config.php
和admin/config.php
中的目录路径。旧服务器
新服务器
In addition to changing the database credentials, you have to change the directory paths in both
config.php
andadmin/config.php
.Old server
New server
我知道它已经很旧了,但现在可能还有其他一些人也遇到了同样的问题,并且被困住了或者无法弄清楚问题是什么。迁移商店后,您将收到图像损坏错误和/或不显示图像(即使您在配置文件中正确设置了所有内容并更改了文件/文件夹权限),因为数据库中的路径可能不正确。您需要根据新的 FTP 文件结构更新数据库中的链接。 “product_images”表用于图像,“product”表用于微型图。您可以从管理面板手动完成此操作,方法是实际打开所有产品并再次添加照片(这相当荒谬),或者他们可能有一个模块来完成这项工作。老实说,我没有找到任何东西 - 甚至在供应商的官方论坛上都没有找到问题所在,所以我创建了一个简单的 JAVA 应用程序来更新数据库中的图像路径(保持文件名“不变”)基于FTP文件结构。您可以通过单击以下 MEGA 链接下载它。在执行任何操作之前,请确保您已备份所有内容(数据库和文件)。链接:https://mega.nz/#!8cF1DawQ!C_pzuJJvxOBkPa8Koss_yfMxlF59l_8c0OewghoAzuA
希望对您有帮助!
问候
I know it is old but there may be some other guys out there who run into this same problem nowadays too and are stuck with it or can't figure out what the problem is. After migrating your shop, you will receive broken image errors and/or not displaying images (even after you have set everything correctly in the config files and changed the file/folder permissions) because the paths in the database are probably incorrect. You need to update the links in your database based on your new FTP file structure. 'product_images' table for the images and 'product' table for miniatures. You can do it manually from the admin panel by actually opening all products and adding the photos again (This is rather ridiculous) or they may have a module to do the job. I honestly did not find anything - not even a proper answer on the official forum of the provider in question to what the problem was so I created a simple JAVA application that updates the image paths (leaving the file names "untouched") in the database based on the FTP file structure. You can download it by clicking the following MEGA link. Before doing anything, please make sure you have a back-up of everything (database and files). Link: https://mega.nz/#!8cF1DawQ!C_pzuJJvxOBkPa8Koss_yfMxlF59l_8c0OewghoAzuA
Hope it is helpful!
Regards