I’m having following Zend Session error with my zend project:
Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'Zend_Session::start() - /home/besthomes/public_html/Zend/Session.php(Line:426): Error #2 session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/besthomes/public_html/Zend/Exception.php:1) Array' in /home/besthomes/public_html/Zend/Session.php:432 Stack trace: #0 /home/besthomes/public_html/index.php(47): Zend_Session::start() #1 {main} thrown in /home/besthomes/public_html/Zend/Session.php on line 432
I have wrote this code in bootstrap file:
include('include.php');
include "Zend/Loader.php";
Zend_Loader::registerAutoload();
Zend_Session::start();
i couldn’t know the reason for this error. please help to get out of this problem.
Thanks.
Check if you don’t have additional characters in your files. For example –
this code won’t trigger an error:
but that one will:
Same thing applies to included files. But, when you include files you must also notice to do not have additional lines after clossing tag (if you use them). This will work:
but something like that won’t:
So that’s why some people consider not using closing tag in php scripts as good practice.
You can also workaround that problem using
ob_startandob_end_flush, but like I said – it’s workaround, not solution.