我尝试在我的magento中安装一个缓存模块并将一些代码(以启用后端缓存)粘贴到我的local.xml,现在我收到了这些错误。
There has been an error processing your request
Cannot send headers; headers already sent in Mage.php, line 767
Trace:
0 /home1/devirona/public_html/includes/src/__default.php(32045): Varien_Data_Collection_Db->setConnection(false)
1 /home1/devirona/public_html/includes/src/__default.php(24081): Mage_Core_Model_Resource_Db_Collection_Abstract->__construct(Object(Mage_Core_Model_Resource_Website))
2 /home1/devirona/public_html/includes/src/__default.php(24113): Mage_Core_Model_Config->getModelInstance('core_resource/w...', Object(Mage_Core_Model_Resource_Website))
3 /home1/devirona/public_html/app/Mage.php(491): Mage_Core_Model_Config->getResourceModelInstance('core/website_co...', Object(Mage_Core_Model_Resource_Website))
4 /home1/devirona/public_html/includes/src/__default.php(5861): Mage::getResourceModel('core/website_co...', Object(Mage_Core_Model_Resource_Website))
5 /home1/devirona/public_html/includes/src/__default.php(5866): Mage_Core_Model_Abstract->getResourceCollection()
6 /home1/devirona/public_html/includes/src/__default.php(20959): Mage_Core_Model_Abstract->getCollection()
7 /home1/devirona/public_html/includes/src/__default.php(20817): Mage_Core_Model_App->_initStores()
8 /home1/devirona/public_html/includes/src/__default.php(20700): Mage_Core_Model_App->_initCurrentStore('', 'store')
9 /home1/devirona/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
10 /home1/devirona/public_html/index.php(87): Mage::run('', 'store')
11 {main}
我尝试撤消我所做的但是徒劳无功。
<?xml version="1.0"?>
<!--
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Mage
* @package Mage_Core
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
-->
<config>
<global>
<install>
<date><![CDATA[Tue, 02 Sep 2014 14:04:20 +0000]]></date>
</install>
<crypt>
<key><![CDATA[asdasdasda]]></key>
</crypt>
<disable_local_modules>false</disable_local_modules>
<resources>
<db>
<table_prefix><![CDATA[dv_]]></table_prefix>
</db>
<default_setup>
<connection>
<host><![CDATA[localhost]]></host>
<username><![CDATA[devirona]]></username>
<password><![CDATA[*********]]></password>
<dbname><![CDATA[devirona_store]]></dbname>
<initStatements><![CDATA[SET NAMES utf8]]></initStatements>
<model><![CDATA[mysql4]]></model>
<type><![CDATA[pdo_mysql]]></type>
<pdoType><![CDATA[]]></pdoType>
<active>1</active>
</connection>
</default_setup>
</resources>
<session_save><![CDATA[files]]></session_save>
<cache>
<backend>Netzarbeiter_Cache_Model_Symlink</backend>
<backend_options>
<cache_dir>var/cache</cache_dir>
<hashed_directory_level>1</hashed_directory_level>
<hashed_directory_umask>0777</hashed_directory_umask>
<file_name_prefix>mage</file_name_prefix>
</backend_options>
</cache>
</global>
<admin>
<routers>
<adminhtml>
<args>
<frontName><![CDATA[admin]]></frontName>
</args>
</adminhtml>
</routers>
</admin>
&#13;
这是我的local.xml
我无法找到导致此错误的原因.. 我添加了缓存代码。首先我在配置结束后添加它...然后我改变它..在将代码放回配置中之前我保存它并尝试运行它然后我遇到了问题
答案 0 :(得分:0)
首先尝试通过转到/includes/config.php并注释掉以下行来禁用编译器:
define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src');
define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat');
然后尝试刷新缓存(通过删除var / cache目录)并查看它是否有帮助。