deathadder Posted October 6, 2012 Share Posted October 6, 2012 im getting this weird error when i use session_start(); http://prntscr.com/gvc3a idk how to fix this Quote Link to comment https://forums.phpfreaks.com/topic/269150-session-error/ Share on other sites More sharing options...
gizmola Posted October 6, 2012 Share Posted October 6, 2012 You get this error when output has already been sent prior to the session_start call. There are a number of ways this can happen, either through design, or just having some extra lines at the top or bottom of an include file. Without looking at your code it's impossible to help more than this, but that should be enough for you to start looking for the problem. Quote Link to comment https://forums.phpfreaks.com/topic/269150-session-error/#findComment-1383164 Share on other sites More sharing options...
deathadder Posted October 6, 2012 Author Share Posted October 6, 2012 thats the problem line 1 of the file where this error is displays there is <?php include 'inc/header.php'; ?> and line one of header.php is <?php include 'inc/config.php'; ?> line 2 of header.php is session_start(); i tried putting session_start(); on line one but it still didn't work Quote Link to comment https://forums.phpfreaks.com/topic/269150-session-error/#findComment-1383165 Share on other sites More sharing options...
PFMaBiSmAd Posted October 6, 2012 Share Posted October 6, 2012 Output started on line 1 of your file, when you have nothing in the file before the <?php tag, is likely due to the BOM characters. See the last reply in the sticky post concerning header errors - http://forums.phpfreaks.com/topic/1895-header-errors-read-here-before-posting-them/ Quote Link to comment https://forums.phpfreaks.com/topic/269150-session-error/#findComment-1383207 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.