Welcome, Guest. Please Login or Register.
July 23, 2025, 06:37:22 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  English User Help  |  English Help  |  2: Cannot add header information - headers already sent « previous next »
Pages: [1] Reply Ignore Print
Author Topic: 2: Cannot add header information - headers already sent  (Read 730 times)
Aether
Jr. Member
**
Posts: 96


The n00b has entered the building!

2: Cannot add header information - headers already sent
« on: March 08, 2003, 04:29:54 PM »
Reply with quote

I've just installed a fresh copy of YaBBSE 1.5.1 RC1 B44, and I keep getting this error:

QuoteAn Error Has Occurred!

2: Cannot add header information - headers already sent
(D:\WebRoot\aether\aet\Sources\Subs.php ln 154)


I've traced back the offending lines to:

Quote// print stuff to prevent cacheing of pages
   header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
   header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT');

I'm a bit in the dark about this, but I did try taking the headers out of the Subs.php file and putting them at the start of index.php in my main folder.

However, doing this, although does clear up the main part of the forum, shows this error message after the Copyright table cell:

QuoteAn Error Has Occurred!

2: open(/tmp\sess_612a4f594ea93c00c28c7f7b15c6e6f4, O_RDWR) failed: No such file or directory (2)
(Unknown ln 0)



It is then followed by a "Back" link, and the vB style login, then another copyright notice.

The Second Error

I would appreciate any help whatsoever...
Logged

Got rid of n00b ranking, cause I'd go off the scale ::)
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:2: Cannot add header information - headers already sent
« Reply #1 on: March 08, 2003, 05:14:53 PM »
Reply with quote

Not too sure about the headers but the first thing that must be fixed is the session_save_path in your php configuration.  Either ask your host to fix it or there are a few threads around here with instructions.
Logged

[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:2: Cannot add header information - headers already sent
« Reply #2 on: March 08, 2003, 08:56:55 PM »
Reply with quote

Both errors will go away if you set the session.save_path to a correct value in php.ini.

If you are not the owner of the server, send an email off to your administrator.

-[Unknown]
Logged
Aether
Jr. Member
**
Posts: 96


The n00b has entered the building!

Same Error Again.
« Reply #3 on: March 22, 2003, 10:36:51 PM »
Reply with quote

Thanks guys... It worked like a charm... mostly... I just didn't want to drag this topic up from page 8 without a good reason.

BUT!

Now I'm getting the first error again:
An Error Has Occurred!

Quote
2: Cannot add header information - headers already sent
(D:\WebRoot\aether\aet\Sources\Subs.php ln 154)  


Even with it fixed, but only when a new account tries to register. I've been looking for the cause through the script files, but there doesn't seem to be any problem with info being sent before the headers...

Could you give me any help, please?

Thanks, once again.
Logged

Got rid of n00b ranking, cause I'd go off the scale ::)
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  2: Cannot add header information - headers already sent « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.011 seconds with 17 queries.