Hello, Recently I buy a website. I try to install a clean setup(the same results I had with move too.) But I receive one big error. When I enter codes,above <?php in the .index.php file,the file "crash" and returns: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/*/public_html/my-sl.net/index.php:4) in /home/*/public_html/my-sl.net/include/session.class.inc.php on line 68 In line4 in index,it is <?php And in line 68 it is session_start(); What Can I Do? Thank you
You cannot start a session after any output has been products, echo, printed ect. You can use output buffering to get around this.. php.net/ob_start php.net/ob_end_flush
So what can I Do? I want some ads and title,keywords and description to be before php code start. Regards
Make this the very first line of your file: <?php ob_start(); ?> Put this at the end of your file: <?php ob_end_flush(); ?>
A better solution is that you find the "start_session();" and add your code after it. Or you could simply show us your source code.