gibigbig Posted April 20, 2007 Share Posted April 20, 2007 help me, when i try to use the 'include' function in my scripts i get this error: Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/www/narutoking.com/index.php:3) in /home/www/narutoking.com/common.php on line 3 can someone please explain what this means. thanks a bunch Link to comment https://forums.phpfreaks.com/topic/47938-need-help-with-include-function/ Share on other sites More sharing options...
jscix Posted April 20, 2007 Share Posted April 20, 2007 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/www/narutoking.com/index.php:3) in /home/www/narutoking.com/common.php on line 3 Means, the file your trying to include, is trying to start a session "Session_Start()", after the page/script your including it in, has already sent data to the page, session_start() has to be the first thing on the page. so, your best bet is to add in a <?php session_start(); ?> to the top of index.php Link to comment https://forums.phpfreaks.com/topic/47938-need-help-with-include-function/#findComment-234282 Share on other sites More sharing options...
gibigbig Posted April 20, 2007 Author Share Posted April 20, 2007 thanks a lot , problem solved, script works fine now! Link to comment https://forums.phpfreaks.com/topic/47938-need-help-with-include-function/#findComment-234283 Share on other sites More sharing options...
per1os Posted April 20, 2007 Share Posted April 20, 2007 session_start cannot be called if output has been sent to the browser. IE: <html> <?php session_start(); // error would be thrown here ?> Instead do this: <?php session_start(); // No error should be thrown. ?> <html> Link to comment https://forums.phpfreaks.com/topic/47938-need-help-with-include-function/#findComment-234284 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.