php forum
php mysql forum
php mysql smarty
 
Topic Options
#264525 - 12/12/03 11:19 PM "Cannot Modify Header Info" Error on Who's Online (6.4)
smoknz28 Offline
Enthusiast

Registered: 04/10/03
Posts: 393
Loc: Washington, D.C.

   "Cannot Modify Header Info"  Error on Who Add to del.icio.us
  Digg "Cannot Modify Header Info"  Error on Who Digg it
I just upgraded from 6.3.1 to 6.4 and there didn't seem to be any problems except for some errors in regards to some polls not upgrading properly.<br /><br />I do see this error when I click on "Who's Online":<br /><br />Warning: Cannot modify header information - headers already sent by (output started at /home/smoknz28/public_html/ubbthreads/languages/english/online.php:180) in /home/smoknz28/public_html/ubbthreads/ubbt.inc.php on line 269<br /><br />Seems to be the only error I'm finding so far. Any thoughts on this?<br /><br />Thanks,<br />Gonzo
_________________________
F-Body Hideout
Project Speedy

Top
#264526 - 12/13/03 12:53 AM Re: "Cannot Modify Header Info" Error on Who's Online (6.4) [Re: General_Failure]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
did you add a mod.. the biggest culpti is a missing ; or } or " so if you added a mod go back and look at that line of code..

Top
#264527 - 12/13/03 11:01 AM Re: "Cannot Modify Header Info" Error on Who's Online (6.4) [Re: 234234]
smoknz28 Offline
Enthusiast

Registered: 04/10/03
Posts: 393
Loc: Washington, D.C.
Yes I did, but from what I recall....I had the error before I had added the mods.
_________________________
F-Body Hideout
Project Speedy

Top
#264528 - 12/14/03 02:31 PM Re: "Cannot Modify Header Info" Error on Who's Online (6.4) [Re: General_Failure]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
A header already sent error is usually extra space after the php closing tag ?><br /><br />I'd check the online script, template and language file and make sure there's no extra spaces after the php closing tags. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#264529 - 12/15/03 02:31 PM Re: "Cannot Modify Header Info" Error on Who's Online (6.4) [Re: Daine]
smoknz28 Offline
Enthusiast

Registered: 04/10/03
Posts: 393
Loc: Washington, D.C.
Thanks guys....going in to check. <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" />
_________________________
F-Body Hideout
Project Speedy

Top
#264530 - 12/15/03 02:55 PM Re: "Cannot Modify Header Info" Error on Who's Online (6.4) [Re: General_Failure]
smoknz28 Offline
Enthusiast

Registered: 04/10/03
Posts: 393
Loc: Washington, D.C.
Yup, Josh....you nailed it. <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" /> <br /> <br />Working like a charm now....had extra spaces after the closing php tag in each of the files. <br /> <br />Much appreciated! <img src="http://www.ubbdev.com/forum/images/graemlins/laugh.gif" alt="" />
_________________________
F-Body Hideout
Project Speedy

Top
#264531 - 12/30/03 10:25 PM Re: "Cannot Modify Header Info" Error on Who's Online (6.4) [Re: Daine]
Myke Offline
Power User

Registered: 09/06/99
Posts: 87
Loc: Sydney, Australia
[]JoshPet said:<br />A header already sent error is usually extra space after the php closing tag ?><br /><br />I'd check the online script, template and language file and make sure there's no extra spaces after the php closing tags. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> [/]<br /><br />So what do you suggest if one can't find any offending white space?<br /><br />My particular problem is that I have login box on my site's index.php. It all worked fine when I was running 6.2 but when I recently upgraded to 6.4, I start getting these errors (headers already sent, etc).<br /><br />And, I only get the error the first time I hit the site and I'm already logged in. If I go to the forums and return to the main site index, I won't see the error again.<br /><br />My login box is simply a hacked loginpal script, with a lot of stuff trimmed out, and the user authetication added at the beginning. The error I get is:<br /><br />Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/vfighter/index.php:24) in /usr/www/users/vfighter/versuscity/ubbt.inc.php on line 572<br /><br />and line 572 of ubbt.inc.php is the call to setcookie.

Top
#264532 - 12/30/03 10:29 PM Re: "Cannot Modify Header Info" Error on Who's Online (6.4) [Re: kja]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
It's usually there somewhere. I can be in language files, templates, any of the pal box scripts. It's somewhere on that page after the ?> tag.<br /><br />The error happens if output gets echoed to the page before the cookies are set. That output gets echoed first by being outside the php tags. <br /><br />It only happens once because that particular cookie probably doesn't need to be reset on the second load of that same page. Hence it's not breaking the rules there.<br /><br />When all else fails, if you can't find it, you need to start with fresh unmodified scripts and move from there.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#264533 - 12/30/03 10:55 PM Re: "Cannot Modify Header Info" Error on Who's Online (6.4) [Re: Daine]
Myke Offline
Power User

Registered: 09/06/99
Posts: 87
Loc: Sydney, Australia
[]JoshPet said:<br />When all else fails, if you can't find it, you need to start with fresh unmodified scripts and move from there. [/]<br /><br />See, the funny thing here is that nothing has changed except for ubbt.inc.php when I upgraded to 6.4 <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br /><br />I can seemingly replicate the problem in my front page login script. When I authenticate the user:<br /><br />$userob = new user;<br />$user = $userob -> authenticate("");<br />$user = $userob -> authenticate("U_Username,U_Privates,U_Number");<br />list($Username,$Privates,$Number) = $user;<br /><br />The line shown in bold isn't usually there, but if I add it in, then I'll get two instances of the error. The loginpal from IIP has that line in bold in there.<br /><br />Please note that I'm not using any pals or the IIP at all. I have just the one login script which my index.php includes, and it worked perfectly fine prior to 6.4.

Top
#264534 - 12/30/03 11:35 PM Re: "Cannot Modify Header Info" Error on Who's Online (6.4) [Re: kja]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
All signs still point to output before the cookies get set. <br /><br />Of course you can replicate it with the authenticate function - the authenticate function is what sets the cookies. You don't need to do it twice.<br /><br />Look at any files which get included or echoed above that. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br /><br />It's what's above that in the script that might be causing trouble.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#264535 - 12/31/03 09:28 PM Re: "Cannot Modify Header Info" Error on Who's Online (6.4) [Re: Daine]
Myke Offline
Power User

Registered: 09/06/99
Posts: 87
Loc: Sydney, Australia
[]JoshPet said:<br />Look at any files which get included or echoed above that. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br /><br />It's what's above that in the script that might be causing trouble. [/]<br /><br />OK, so here's what is above the authentication in my login script:<br /><br />
Code:
<br />&lt;?<br />// --------------------------------<br />// define some stuff<br />   $spacer = "&amp;nbsp;";<br />   $loginboxsize = "10";<br /><br />// --------------------------------<br />// require the language file<br />   require "$path/languages/$w3t_language/login.php";<br /><br />// --------------------------------<br />// authenticate visitor<br />        $userob = new user;<br />        $user = $userob -&gt; authenticate("U_Username,U_Privates,U_Number");<br />        list($Username,$Privates,$Number) = $user;<br />
<br /><br />Note that $path is defined in my main index.php which calls my login script like this:<br /><br />
Code:
<br />      &lt;?php include "minilogin.php"; ?&gt;<br />
<br /><br />At first I thought that the white space before the <?php above was causing the error, but even when I remove it the error remains.<br /><br />Do you see anything here that's likely to be the cause?

Top
#264536 - 12/31/03 10:57 PM Re: "Cannot Modify Header Info" Error on Who's Online (6.4) [Re: kja]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
Try this online template and see if that helps.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#264537 - 01/01/04 02:16 PM Re: "Cannot Modify Header Info" Error on Who's Online (6.4) [Re: sf49rminer]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Did you check that login.php language file for extra space before or after it's closing tag?<br /><br />Then on your index.php file... before this is included:<br /><br /> <?php include "minilogin.php"; ?><br /><br />Make sure there is NO output. Again there can be no output to the page before the cookie is set.<br /><br />So that include above should be the very first thing on the page.<br /><br />If it's not, the authenticate function needs to be moved BEFORE any output, as it sets the cookies. <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#264538 - 01/02/04 08:58 PM Re: "Cannot Modify Header Info" Error on Who's Online (6.4) [Re: Daine]
Myke Offline
Power User

Registered: 09/06/99
Posts: 87
Loc: Sydney, Australia
Thanks Josh! That was the ticket. The authentication was occuring within my login script which was being called by the main site's index.php. However I had a lot of output before the actual call.<br /><br />What I did was to move the authetication out of the login script and into the main index.php. Hmmm, kinda like how it's done in IIP... *doh* <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br /><br />Thanks again for the help.

Top
#264539 - 01/02/04 09:34 PM Re: "Cannot Modify Header Info" Error on Who's Online (6.4) [Re: kja]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Excatly. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> Glad you got it figured out. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top


Moderator:  Gizmo 
Who's Online
0 Registered (), 23 Guests and 4 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Blogs, love em or hate em?
by Ian_W
10/05/08 03:47 PM
What do you use to edit the files
by Ian_W
10/05/08 03:33 PM
BeyondCompare v3.00
by Ian_W
10/05/08 03:32 PM
Glossy Black Theme with Image Reflection
by Gizmo
10/05/08 02:17 PM
ShareThis
by Gizmo
09/28/08 05:06 AM
[7.3] Viewing MySQL logfiles made easier
by AllenAyres
09/27/08 09:57 PM
Looking for a simple upload script
by Murphdog
09/26/08 08:45 PM
New Mods
[7.3] Viewing MySQL logfiles made easier
by blaaskaak
09/24/08 05:39 PM
[7.3] Language file checker
by blaaskaak
09/09/08 12:56 AM
[7.3.1] add search to showmembers page
by blaaskaak
09/07/08 04:50 AM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
ghengis317, NitroX, Dogan, EliYah-, W-D
13344 Registered Users
Top Posters Last 30 Days
AllenAyres 16
blaaskaak 12
FREAK1 7
Mike L_dup1 4
Chris Bale 4
Ian_W 4
W-D 3

 

 

 
fusionbb message board php hacks