Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/269150-session-error/#findComment-1383164
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/269150-session-error/#findComment-1383165
Share on other sites

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/

Link to comment
https://forums.phpfreaks.com/topic/269150-session-error/#findComment-1383207
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.