Jump to content

Warning: session_start() Cannot send session cookie / cache limiter - headers...


busillis

Recommended Posts

I'm getting these two errors, but this was working fine earlier today!?

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /xxxx/xxxx/xxxx/xxxx/project/editaccount-page.php:2) in ./header.php on line 2

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /xxxx/xxxx/xxxx/xxxx/project/editaccount-page.php:2) in ./header.php on line 2

 

Any help would be greatly appreciated. 

Link to comment
Share on other sites

Well what did you change?

 

I'm getting these two errors, but this was working fine earlier today!?

 

 

Nothing... I tested it from work today (only viewing the pages and using the functionality; did not even open the code.  I ran it just now and i'm getting this...

Link to comment
Share on other sites

Read the error. It tells you where the output is being started at, that is preventing the headers from being sent.

 

Unfortunately I don't understand it though?  If I did, I wouldn't be here :-P

 

Is the problem in the header file, or the file that is invoking the header (requiring it) ?

Link to comment
Share on other sites

OK, I think I solved it...

 

I removed "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">" from above <?php in the invoking file. (i.e. edit page)

 

Would this be the solution?  I just don't want this problem to mystically reappear!

 

btw I really appreciate your help here guys.

Link to comment
Share on other sites

I removed "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">" from above <?php in the invoking file. (i.e. edit page)

 

Before you started hacking your code and deleting things, did you check if that line of code was supposed to be in that file?

 

Either your hosting company changed the output buffering setting in php.ini (in which case they should have warned you), or somehow your files are being changed. If your hosting company changed a setting, the solution is different than if your files are being changed.

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.