本地主机上的Mangento指向在线站点 [英] Mangento on localhost points to online site

查看:97
本文介绍了本地主机上的Mangento指向在线站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个新的magento 1.7,使用的是在线商店中复制的sql.该车间使用的是Mag 1.4,因此其想法是将数据库更新为1.7.将1.7 shop链接到localhost上的数据库后,它没有错误,但是127.0.0.1/shop重定向到了在线商店.

I have a fresh magento 1.7 using a copied sql from a shop online. The shop is using Mag 1.4 so the idea is to update the DB to 1.7. After linking the 1.7 shop to the DB on localhost, it is error free, however 127.0.0.1/shop redirects to the online store.

更改base_url无济于事.

Changing base_url does not help.

数据库仍然有对在线站点的引用,但是我看不到任何可以有所作为的引用.

The DB still has references to the online site, but I dont see any reference that would make a difference.

这似乎是一个常见的问题,没有任何解决方案? http://www.magentocommerce.com/boards/viewthread/280257/#t387542 http://www.magentocommerce.com/boards/viewthread/224658/#t313216

This seems to be a common problem with out any solutions? http://www.magentocommerce.com/boards/viewthread/280257/#t387542 http://www.magentocommerce.com/boards/viewthread/224658/#t313216

更新-

位于 http://www.magentocommerce.com/boards/viewthread/280257/#t387542 已经由Chiefair进行了全面的更新,例如下面的Fiasco Labs给出的答案-如果您需要更多信息

The question at http://www.magentocommerce.com/boards/viewthread/280257/#t387542 has been updated with a comprehensive answer by chiefair, like the one given by Fiasco Labs below - if you are in need of more info

推荐答案

更改了Magento数据库中的基本URL设置,并且仍将使用旧的基本URL.您在更改它们之前启动了Magento一次,它缓存了旧配置,现在您已锁定在旧站点上.

Changed your base URL settings in the Magento database and it's still going to the old base URLs. You started Magento once before changing them and it cached the old configuration and now you're locked onto the old site.

对于Linux,将您的var/目录结构更改为chmod -R777.那里没有写权限,Magento已在/tmp中建立了一个高速缓存,因为它需要在某个地方写入高速缓存文件.它缓存了配置设置,直到缓存位于正确的目录位置后,才会重新读取它们.如果var/cache中有子目录,请将其全部删除.您可能必须去寻找/tmp/*/var/cache并删除它们.

For Linux, change your var/ directory structure to chmod -R 777. You don't have write permissions there and Magento has established a cache in /tmp as it needed somewhere to write the cache files. It's cached the config settings and will not reread them until the cache is in the right directory location. If there are subdirectories in var/cache, delete them all. You might have to go hunting for /tmp/*/var/cache and delete those as well.

对于Mac和Windows,同样如此,如果您已更改数据库并可以看到phpMyAdmin中所做的更改,则已手动清除了var/cache子目录,并重新启动了Apache,并且系统仍处于运行状态重定向,您很早就遇到了配置错误,该错误配置将Magento的缓存写入了其他位置.这就是为什么它是持久性的.通常,重新启动计算机会在Mac和Linux上清除它,因为在操作系统重新启动时,它们会在其临时文件夹中进行整理.

Same goes for Mac and Windows, if you've got the database changed and can see the changes took in phpMyAdmin, you have manually cleaned out your var/cache subdirectories, given Apache a restart, and the system is still redirecting, you early on, had a misconfiguration that wrote Magento's cache elsewhere. That is why it's persistent. Usually a machine reboot will clear it on Mac and Linux as they do housekeeping on their temp folders when the OS restarts.

以下是系统/tmp 的Magento缓存存储在具有错误文件权限的Linux服务器上正在运行的屏幕截图.

Here are screenshots of the system /tmp Magento cache storage in action on a Linux server with bad file permissions.

请注意两张图片的顶部地址栏...

这是导致您遇到麻烦的隐藏缓存.

这篇关于本地主机上的Mangento指向在线站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆