Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Session Error Message
nootkan
Posted on 05 Apr 2012, 16:29:48

Access: Member
Total Posts: 16
Joined: 2012-03-05

Lately I've been seeing this error in my log files

[Thu Apr 05 06:33:05 2012] [error] [client 66.249.67.42] PHP Warning:  session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/username/public_html/brittanycod.html:6) in /home/username/public_html/news/index.php on line 22

[Thu Apr 05 06:33:05 2012] [error] [client 66.249.67.42] PHP Warning:  session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/username/public_html/brittanycod.html:6) in /home/username/public_html/news/index.php on line 22

The ip address belongs to googlebot and when I googled for help some of the solutons were to make sure there is nothing else trying to output to the browser or white space before the

session_name('n13news');
 if(!isset($_SESSION)){
session_start();
}

When I open news/index.php and look at lines 19-24 I see

ob_start();
session_name('n13news');
if(!isset($_SESSION)){
session_start();
}
ob_end_clean();

there is a white space above the obstart(); and it looks like obstart(); is calling to the browser so I am assuming this is my problem. I've removed the empty space but it didn't resolve the log errors. I know very little about php so thought I see if I could get help here to see if this is normal with the script or maybe a bug?

#3828
Last edited by nootkan at 2012-04-10 04:50:08 Reason: update
Chris
Posted on 06 Apr 2012, 20:37:43

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

The only reason I can think for this error to happen is if you're using the news script along with another script that uses sessions, if either of them outputs any information to the browser before the other is executed you'll get the error messages you're seeing in the log. These errors aren't critical, the script will still function when these errors do happen.

#3830
nootkan
Posted on 10 Apr 2012, 04:50:08

Access: Member
Total Posts: 16
Joined: 2012-03-05

Yes I also have crafty syntax live help running also so that could be the culprit. Good to know that it is not a critical error, but it would be nice to learn how to remedy the error. I'll keep looking.

#3836
Network-13.com © 2013