Jump to content

header problems


Kingy

Recommended Posts

ive read the sticky and neither correction fixes this problem

 

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by

 

my file starts

 

<?php

ob_start();

session_start();

?>

 

why am i still recieving this error

 

 

Link to comment
Share on other sites

ob_start(); sends header information thats why.

 

and what use is this for?

 

ob_start() does not send any headers. It creates a buffer for output to go into, untill that buffer is sent no headers (or output) will be sent either.

 

Output buffering is often used as a hack around header errors.

Link to comment
Share on other sites

The error message contains information about where the output occurred in addition to what code could not output headers. By just posting bits and pieces of the error, just means that it will take a really long time to give you a direct answer that solves your problem.

 

If you are not going to read what the error message states and try to figure out the problem yourself, then you must post the entire error message if you want someone else to help you. xxxxx out any sensitive information such as account/domain name in the file paths if you don't want that information posted.

Link to comment
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.