打开购物车网站转移到另一台主机,图像损坏

发布于 2024-12-07 04:23:44 字数 79 浏览 0 评论 0原文

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

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

发布评论

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

评论(2

东风软 2024-12-14 04:23:44

除了更改数据库凭据之外,您还必须更改 config.phpadmin/config.php 中的目录路径。

旧服务器

define('DIR_APPLICATION', '/home/oldhost/sites/example.com/html/catalog/');

新服务器

define('DIR_APPLICATION', '/home/newhost/sites/example.com/public_html/catalog/');

In addition to changing the database credentials, you have to change the directory paths in both config.php and admin/config.php.

Old server

define('DIR_APPLICATION', '/home/oldhost/sites/example.com/html/catalog/');

New server

define('DIR_APPLICATION', '/home/newhost/sites/example.com/public_html/catalog/');
廻憶裏菂餘溫 2024-12-14 04:23:44

我知道它已经很旧了,但现在可能还有其他一些人也遇到了同样的问题,并且被困住了或者无法弄清楚问题是什么。迁移商店后,您将收到图像损坏错误和/或不显示图像(即使您在配置文件中正确设置了所有内容并更改了文件/文件夹权限),因为数据库中的路径可能不正确。您需要根据新的 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

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