将Magento安装迁移到新的专用服务器时,出现以下错误
I'm getting the following error when migrating a Magento install to a new Dedicated server
我在克隆和迁移Magento方面非常有经验,但是我不知道这里出了什么问题.
I pretty experienced at cloning and migrating Magento but I can't figure out whats wrong here.
我已经检查了新服务器的兼容性,这很好.
I have checked the new server for compatibility and thats fine..
当uri中存在下划线时,通常会引发此错误.我尝试了不同的子域,但不断收到错误消息.我刚刚将同一站点迁移到我的开发服务器,并且可以正常工作-有什么想法吗?
This error is normally thrown when there is an underscore in the uri . i have tried different subdomains but keep getting the error. I have just migrated the same site to my dev server and it works fine - any ideas ?
Trace: /home/shushush/public_html/shoponline/magento/lib/Zend/Uri.php(143): Zend_Uri_Http->__construct('http', '//www.shushusho...') 1 /home/shushush/public_html/shoponline/magento/app/code/core/Mage/Core/Model/Store.php(712): Zend_Uri::factory('www.shus...') 2 /home/shushush/public_html/shoponline/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(313): Mage_Core_Model_Store->isCurrentlySecure() 3 /home/shushush/public_html/shoponline/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(161): Mage_Core_Controller_Varien_Front->_checkBaseUrl(Object(Mage_Core_Controller_Request_Http)) 4 /home/shushush/public_html/shoponline/magento/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch() 5 /home/shushush/public_html/shoponline/magento/app/Mage.php(640): Mage_Core_Model_App->run(Array) 6 /home/shushush/public_html/shoponline/magento/index.php(80): Mage::run('', 'store') 7 {main}推荐答案
看着您的调用堆栈,看来这是触发您看到的错误/异常的方法
Looking at your call stack, it appears this is the method that triggers the error/exception you're seeing
Zend_Uri_Http->__construct跳到该文件的源头,我猜(因为您没有包括错误文本),这是您所看到的异常.
Jumping to the source of that file, I'm guessing (since you didn't include the error text) this is the exception you're seeing.
#File: lib/Zend/Uri/Http.php protected function __construct($scheme, $schemeSpecific = '') { //... if ($this->valid() === false) { #require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception('Invalid URI supplied'); } //... }看看valid方法的定义
public function valid() { // Return true if and only if all parts of the URI have passed validation return $this->validateUsername() and $this->validatePassword() and $this->validateHost() and $this->validatePort() and $this->validatePath() and $this->validateQuery() and $this->validateFragment(); }您可以看到7种Zend/Magento调用方法来确定URI是否有效.其中之一失败了.我建议添加一些临时调试代码,以确定哪个方法返回false
you can see 7 methods Zend/Magento calls to determine if the URI is valid or not. One of these is failing. I'd recommend adding some temporary debugging code to determine which method is returning false
public function valid() { var_dump($this->validateUsername()); var_dump($this->validatePassword()); var_dump($this->validateHost()); var_dump($this->validatePort()); var_dump($this->validatePath()); var_dump($this->validateQuery()); var_dump($this->validateFragment()); // Return true if and only if all parts of the URI have passed validation return $this->validateUsername() and $this->validatePassword() and $this->validateHost() and $this->validatePort() and $this->validatePath() and $this->validateQuery() and $this->validateFragment(); }然后,一旦知道这一点,就可以查看返回false的方法的定义,并确定失败的字符.
Then, once you know that, you can look at the definition of the method that's returning false and determine which characters it's failing on.
更多推荐
将Magento 1.6.1安装迁移到新的专用服务器时出现错误的uri错误
发布评论