简体   繁体   中英

magento headers already sent in mage.php

I tried to install a caching module in my magento and pasted some code (to enable backend cache) to my local.xml now I get these errors.

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}

I tried undoing what I did but all in vain.

 <?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> 

this is my local.xml

i cant find what is causing this error.. i added the cache code. first i added it after the closing of config... then i changed it.. before placing the code back inside config i saved it and try to run it then i got the problem

First try disabling the compiler by going to /includes/config.php and commenting out the following lines:

define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src');
define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat');

Then try refreshing the cache (by deleting the var/cache directory) and see if it helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM