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. 

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...

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) ?

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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.