php - Zend Session Fatal error -


i'm having following zend session error zend project:

fatal error: uncaught exception 'zend_session_exception' 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 sent (output started @ /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 code in bootstrap file:

include('include.php'); include "zend/loader.php";  zend_loader::registerautoload(); zend_session::start(); 

i couldn't know reason error. please out of problem. thanks.

check if don't have additional characters in files. example -
code won't trigger error:

<?php  session_start(); 

but 1 will:

(blank line here!) <?php  session_start(); 

same thing applies included files. but, when include files must notice not have additional lines after clossing tag (if use them). work:

<?php     //content of included file ?> 

but won't:

<?php     //content of included file ?>     (blank line here!) (!and here) 

so that's why people consider not using closing tag in php scripts practice.

you can workaround problem using ob_start , ob_end_flush, said - it's workaround, not solution.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -