2

My Wordpress pages are returning this error to me:

Fatal error: Uncaught exception 'Zend_Controller_Response_Exception' with message

'Cannot send headers; headers already sent in /home/memteaim/public_html/wp/wp-content/themes/memtea/core/library/class.layout.php, line 159' 
in /home/memteaim/public_html/lib/Zend/Controller/Response/Abstract.php:321 
Stack trace: 
#0 /home/memteaim/public_html/lib/Zend/Controller/Response/Abstract.php(115): Zend_Controller_Response_Abstract->canSendHeaders(true)     #1 /home/memteaim/public_html/app/code/core/Mage/Core/Model/App.php(1246): Zend_Controller_Response_Abstract->setHeader('Content-Type', 'text/html; char...') 
#2 /home/memteaim/public_html/app/code/core/Mage/Core/Model/Cookie.php(93): Mage_Core_Model_App->getResponse() 
#3 /home/memteaim/public_html/app/code/core/Mage/Core/Model/Cookie.php(209): Mage_Core_Model_Cookie->_getResponse() 
#4 /home/memteaim/public_html/app/code/core/Mage/Core/Model/Cookie.php(260): Mage_Core_Model_Cookie->set('frontend', '9cc2ffcf7392261...', NULL, NULL, NULL, NULL, NULL) 
#5 /home/memteaim/public_html/app/co in /home/memteaim/public_html/lib/Zend/Controller/Response/Abstract.php on line 321

Here is line 321 - 325 in my Abstract.php file:

throw new Zend_Controller_Response_Exception('Cannot send headers; headers already sent in ' . $file . ', line ' . $line);
        }

        return !$ok;
    }

What's going on here and how do I fix it. Any help would be amazing, thanks!

doydoy44
  • 5,720
  • 4
  • 29
  • 45
IanTea
  • 21
  • 1
  • I'd say to switch theme from `memtea` to another maybe. – D4V1D Mar 31 '15 at 16:52
  • I would much rather fix the problem than go around it. The memtea theme was built for my site, all other themes are not up to par. Thanks for the response though! – IanTea Mar 31 '15 at 17:21
  • well, with a quickly read in your code, it seems that the controller can't set some headers to your page. Probably, this is happening because Wordpress has already sent the headers, and when the Zend Framework try to sent again, you got this error. Try to do a if-else at line 115 in Abstract.php using headers_sent function. – ital0 Apr 01 '15 at 14:28

0 Answers0