unsider Posted February 25, 2008 Share Posted February 25, 2008 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/unsider/www/andy/main.php:9) in /home/unsider/www/andy/include/session.php on line 46 Can some explain to me what this warning means, or how to potientally how to fix it, or how to hide it? I will post code as soon as I understand why it's being caused, if necessary. Link to comment https://forums.phpfreaks.com/topic/92821-warning-session_start/ Share on other sites More sharing options...
p2grace Posted February 25, 2008 Share Posted February 25, 2008 You need the session_start() declared before any other html code. It's usually best to put it at the very top of every page. Link to comment https://forums.phpfreaks.com/topic/92821-warning-session_start/#findComment-475503 Share on other sites More sharing options...
mainewoods Posted February 25, 2008 Share Posted February 25, 2008 look at one of the pinned topics at the top of this board labeled 'HEADER ERRORS' Link to comment https://forums.phpfreaks.com/topic/92821-warning-session_start/#findComment-475504 Share on other sites More sharing options...
unsider Posted February 25, 2008 Author Share Posted February 25, 2008 Oh, maybe that's why, I had just moved it, I"m going to check that out. Link to comment https://forums.phpfreaks.com/topic/92821-warning-session_start/#findComment-475505 Share on other sites More sharing options...
mainewoods Posted February 25, 2008 Share Posted February 25, 2008 Everybodies had the 'HEADERs ALREADY SENT' error one time or another. Even experienced coders will cause it once and a while when developing new code. Link to comment https://forums.phpfreaks.com/topic/92821-warning-session_start/#findComment-475509 Share on other sites More sharing options...
redarrow Posted February 25, 2008 Share Posted February 25, 2008 were the code then it probly white spaces... <?php session_start();?> no white space..... <?php session_start(); ?> white space..... Link to comment https://forums.phpfreaks.com/topic/92821-warning-session_start/#findComment-475515 Share on other sites More sharing options...
Bauer418 Posted February 25, 2008 Share Posted February 25, 2008 were the code then it probly white spaces... <?php session_start();?> no white space..... <?php session_start(); ?> white space..... It isn't the whitespace inside the PHP that causes the error, because that whitespace is not sent to the browser. It is any output that the browser sees (spaces before opening PHP tags, echo/print statements, etc.). Link to comment https://forums.phpfreaks.com/topic/92821-warning-session_start/#findComment-475521 Share on other sites More sharing options...
unsider Posted February 25, 2008 Author Share Posted February 25, 2008 look at one of the pinned topics at the top of this board labeled 'HEADER ERRORS' Sorry. I'll make sure to check the boards before I ask common questions. and TOPIC SOLVED! Link to comment https://forums.phpfreaks.com/topic/92821-warning-session_start/#findComment-475523 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.