Magento Debug HEADERS ALREADY SENT error

前端 未结 11 664
盖世英雄少女心
盖世英雄少女心 2020-12-02 23:56

I am receiving the following error in my system.log file:

 2011-01-12T14:16:52+00:00 DEBUG (7): HEADERS ALREADY SENT: 
 [0] C:\\xampp\\htdocs\\www.mysite.com         


        
11条回答
  •  猫巷女王i
    2020-12-03 00:53

    Here's the hard way.

    Find the location in the file that's doing the logging

    C:\xampp\htdocs\www.mysite.com\app\code\core\Mage\Core\Controller\Response\Http.php 
    Mage::log('HEADERS ALREADY SENT: '.mageDebugBacktrace(true, true, true));
    

    Add logging to get a copy of every file included/required so far

    Mage::log(print_r(get_included_files(),true));
    

    You can add this logging directly to the core file if you remember to restore the file to it's pre messed with condition, or you can add a temporary copy at

    app/code/local/Mage/Core/Controller/Response/Http.php
    

    as long as you remember to remove it when you're done (or just use git).

    Check this list of files for the usual white-space suspects, and then check them for any functions that might produce output (echo, print, readfile, there's probably more)

提交回复
热议问题