Mutley Posted September 25, 2006 Share Posted September 25, 2006 I tried to do a simple include, to have my forum (SMF) included on my website.Unfortunatly I just get:[code]session_start() [function.session-start]: Cannot send session cache limiter - headers already sent[/code]I thought this was due to spaces after/before the PHP tags but I can't see any.My forum.php is just 7 lines including everything:[code]<?php$title = "Forum";$sideplans = "no";include('inc/header.php');include('forum/index.php');include('inc/footer.php');?>[/code]Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/21989-cannot-send-session-cache-limiter-headers-already-sent/ Share on other sites More sharing options...
wildteen88 Posted September 25, 2006 Share Posted September 25, 2006 Due to the nature of what you're doing. You'll want to use output buffering. So add ob_start(); before the opening php tag and ob_end_flush(); before the closing php tag. So your code should now be like this:[code=php:0]<?phpob_start();$title = "Forum";$sideplans = "no";include('inc/header.php');include('forum/index.php');include('inc/footer.php');ob_end_flush();?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/21989-cannot-send-session-cache-limiter-headers-already-sent/#findComment-98228 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.