magento本地设置问题

时间:2017-06-08 17:21:32

标签: php magento magento-1.7 magento-1.4

我正在尝试在我的本地Windows 10系统中设置magento站点。我从LINUX服务器下载了整个内容和数据库到我的本地。当试图打开管理URL链接得到以下问题。请建议。

a:4:{i:0;s:42:"Invalid response: HTTP/1.1 400 Bad Request";i:1;s:1322:"#0 C:\xampp\htdocs\live\lib\Credis\Client.php(538): Credis_Client->read_reply('select')
#1 C:\xampp\htdocs\live\lib\Credis\Client.php(440): Credis_Client->__call('select', Array)
#2 C:\xampp\htdocs\live\lib\Cm\Cache\Backend\Redis.php(117): Credis_Client->select(0)
#3 C:\xampp\htdocs\live\lib\Zend\Cache.php(153): Cm_Cache_Backend_Redis->__construct(Array)
#4 C:\xampp\htdocs\live\lib\Zend\Cache.php(94): Zend_Cache::_makeBackend('Mage_Cache_Back...', Array, true, true)
#5 C:\xampp\htdocs\live\app\code\core\Mage\Core\Model\Cache.php(137): Zend_Cache::factory('Varien_Cache_Co...', 'Mage_Cache_Back...', Array, Array, true, true, true)
#6 C:\xampp\htdocs\live\app\code\core\Mage\Core\Model\Config.php(1354): Mage_Core_Model_Cache->__construct(Array)
#7 C:\xampp\htdocs\live\app\Mage.php(463): Mage_Core_Model_Config->getModelInstance('core/cache', Array)
#8 C:\xampp\htdocs\live\app\code\core\Mage\Core\Model\App.php(401): Mage::getModel('core/cache', Array)
#9 C:\xampp\htdocs\live\app\code\core\Mage\Core\Model\App.php(295): Mage_Core_Model_App->_initCache(Array)
#10 C:\xampp\htdocs\live\app\code\core\Mage\Core\Model\App.php(337): Mage_Core_Model_App->baseInit(Array)
#11 C:\xampp\htdocs\live\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#12 C:\xampp\htdocs\live\index.php(87): Mage::run('', 'store')
#13 {main}";s:3:"url";s:21:"/live/index.php/admin";s:11:"script_name";s:15:"/live/index.php";}

1 个答案:

答案 0 :(得分:0)

app/etc/local.xml文件中注释缓存部分。缓存部分如下。

<cache>
          <backend>CACHE_BACKEND_CLASS_NAME</backend>
          <backend_options>
            <server>127.0.0.1</server>              <!-- or absolute path to unix socket -->
            <port>6379</port>
            <persistent></persistent>               <!-- Specify a unique string like "cache-db0" to enable persistent connections. -->
            <database>0</database>
            <password></password>
            <force_standalone>0</force_standalone>  <!-- 0 for phpredis, 1 for standalone PHP -->
            <connect_retries>1</connect_retries>    <!-- Reduces errors due to random connection failures -->
            <read_timeout>10</read_timeout>         <!-- Set read timeout duration -->
            <automatic_cleaning_factor>0</automatic_cleaning_factor> <!-- Disabled by default -->
            <compress_data>1</compress_data>        <!-- 0-9 for compression level, recommended: 0 or 1 -->
            <compress_tags>1</compress_tags>        <!-- 0-9 for compression level, recommended: 0 or 1 -->
            <compress_threshold>20480</compress_threshold>  <!-- Strings below this size will not be compressed -->
            <compression_lib>gzip</compression_lib> <!-- Supports gzip, lzf and snappy -->
          </backend_options>
        </cache>

它正在尝试连接到local.xml文件中提到的缓存服务器。我认为你采用了生产设置代码并尝试在本地环境中进行设置。由于您在本地设置中没有缓存,因此无法找到相关详细信息。注释缓存部分并清除var文件夹。然后就完成了。