Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help
Author Message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Sat Dec 24, 2005 5:43 pm Reply with quote

Ok im lost here.
I upgraded some friends site included his forum..no big deal
so i run the upgrade scripts like ive done a lot of times...
He has 10 forums but forum 2 and 3 dont show anymore.
If i click to visit them then i only see the left side of the website.
With error report on it gives:
Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/header.php:33)

anyone?
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sat Dec 24, 2005 6:14 pm Reply with quote

Have you tried the FAQ for that error resolution?
 
View user's profile Send private message
hitwalker







PostPosted: Sat Dec 24, 2005 6:18 pm Reply with quote

yes i did,but im not sure if the header error is related to the disapearance of 2 forums....
anyway...ive already tried the ini fix in your faq but nothing happend..
 
Raven







PostPosted: Sat Dec 24, 2005 10:54 pm Reply with quote

Strange. What is line 33? That tells the script that started output to the browser. Maybe there's a clue there. Also, make sure that gzip is turned off in the forums.
 
hitwalker







PostPosted: Sun Dec 25, 2005 6:55 am Reply with quote

Hi...well to put some more mistery in it how about this...the disapeared forums are back again... !
I thought ive seen it all but this is just amazing.
The headers error is still there but naturaly gone as soon as i turn off display errors.

But raven...how about this,you put this in google :

Cannot modify header information - headers already sent by (output started at /public_html/header.php:33)

Then you get 47.000 results with all websites with the same error and messing up their website,and obviously they didnt fixed it.
So where does this comes from...?
 
Raven







PostPosted: Sun Dec 25, 2005 9:28 am Reply with quote

The error is caused by a script that has started sending output to the browser and then another script or part of a script attempts to sen an HTTP Header command. That's a no-no. That's why output buffering was implemented in PHP. It allows you to have unorganized output before actually sendint it to the browser. In your case, line 33 of header.php has already started sending out out to the browser and whatever code is executing is anow attempting to send a header command of some kind. If turning output buffering on in php.ini and/or .htaccess doesn't work then that implies that the script has already issued a flush() command to the buffer. You will need to trace the scripts line by line. The fact that this started after you did an upgrade would cause me to restore the site to its original form and then start over.
 
hitwalker







PostPosted: Sun Dec 25, 2005 10:01 am Reply with quote

Well it is strange thyat forums disapear and come back again without even touching it..

And the line 33 in header on that site is:
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
 
Raven







PostPosted: Sun Dec 25, 2005 10:15 am Reply with quote

What is the rest of your error? That is the key. It should say something like Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/header.php:33) in /home/??/public_html/????.php on line 99. That part in red is the key to what script is trying to send another header command after regular output has started to the browser.
 
hitwalker







PostPosted: Sun Dec 25, 2005 10:22 am Reply with quote

Ok,i just turned on his error and i get this:

(output started at /home/public_html/header.php:33)

in
/home/public_html/includes/sessions.php on line 239
/home/public_html/includes/sessions.php on line 240
/home/public_html/includes/page_header.php on line 495
/home/public_html/includes/page_header.php on line 497
/home/public_html/includes/page_header.php on line 498
 
Raven







PostPosted: Sun Dec 25, 2005 11:07 am Reply with quote

In modules/Forums/config.php youshould have code similar to this
Code:
<?php


@include("../../mainfile.php");
define('PHPBB_INSTALLED', true);

?>

Try changing it to
Code:
<?php


@include_once("../../mainfile.php");
define('PHPBB_INSTALLED', true);

?>
 
hitwalker







PostPosted: Sun Dec 25, 2005 12:44 pm Reply with quote

Sad Sad
It already have :



if(defined('INSIDE_MOD')) {
@include_once("mainfile.php");
} else {
@include_once("../../mainfile.php");
}
define('PHPBB_INSTALLED', true);
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Sun Dec 25, 2005 1:47 pm Reply with quote

I'd take out the includes to mainfile.php completely. include_once doesn't always seem to work
Then enabling output buffering should always work to suppress those header errors

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
hitwalker







PostPosted: Sun Dec 25, 2005 2:34 pm Reply with quote

Well that doesnt work also Sad
whatever i exclude/uncomment ,the error still shows...
Sure i can disable display error ,then its gone...
But the point was to solve it.. Smile
 
hitwalker







PostPosted: Sun Dec 25, 2005 3:41 pm Reply with quote

and btw, these are lines refering to in the error list.

setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);

setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);


header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header ('Expires: 0');

header ('Pragma: no-cache');

$template->pparse('overall_header');
 
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Sun Dec 25, 2005 4:29 pm Reply with quote

Merry Christmas Hitwalker,

There is a helpful thread about this Cannot modify header information problem but with FF. It was the solution for many users. Maybe you should try the header solution also. I´m not sure if this really fix your problem, but try it, if you have enough time. Smile
[ Only registered users can see links on this board! Get registered or login! ]
 
View user's profile Send private message
hitwalker







PostPosted: Sun Dec 25, 2005 4:42 pm Reply with quote

Hi susann...
i could kiss you...(but thank god your in germany ...lol...)
I was so sure i checked it in IE and thought it was just as bad.
But i tried IE and it was ok...
So i tried in the header:

ob_clean();
ob_start();


And the errors are gone...
Well done and thank you....
 
Susann







PostPosted: Sun Dec 25, 2005 4:45 pm Reply with quote

My Christmas present for you ! Smile
 
hitwalker







PostPosted: Sun Dec 25, 2005 4:49 pm Reply with quote

Groovy
 
hitwalker







PostPosted: Mon Dec 26, 2005 10:34 am Reply with quote

Sad i think we laught to soon...
I got a call from the friend who's site i was doing this on and he couldnt see his site anymore !

Ok so yesterday after i added to the header.php :
ob_clean();
ob_start();

the errors in firefox were gone,and in IE everything showed fine.

And i couldnt find any other problem but he couldnt see his site.
All he saw was a white page .....lol

So i called a friend of him and he had the same problem,he couldnt see the site...also blank!

So i was the only one who could see the site..

So i took out the :

ob_clean();
ob_start();

and all was fine again....
How the heck is that possible..
 
Susann







PostPosted: Mon Dec 26, 2005 11:15 am Reply with quote

The method with the header.php worked for some users, but some other got only a blank page.I´m not sure if this depends on the nuke version,(it worked for the one user with nuke 7.5 and they said also in this thread we are looking for a solution for higher nuke versions) but if you use the changes in the header.php you have to check the site with all browsers.


Last edited by Susann on Mon Dec 26, 2005 11:20 am; edited 1 time in total 
hitwalker







PostPosted: Mon Dec 26, 2005 11:18 am Reply with quote

hello susann,well we both checked with IE and firefox and i could see the site but others couldnt see it...
thats weird..
 
Susann







PostPosted: Mon Dec 26, 2005 11:22 am Reply with quote

Have you cleared your cache and what nuke version are you talking about ?
 
hitwalker







PostPosted: Mon Dec 26, 2005 3:06 pm Reply with quote

yes...lol
i always clear my stuff when im checking stuff...
 
fujilives
New Member
New Member



Joined: Jul 20, 2006
Posts: 1

PostPosted: Thu Jul 20, 2006 2:39 pm Reply with quote

The obj thing worked for me, solved a huge headache. Thank you very much for providing me with the info I searched so f***ing hard for.
 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Thu Jul 20, 2006 3:21 pm Reply with quote

This is your first post AND you used the search first? Well done, outsanding effort on your part.
Welcome to Ravens PHP Scripts!
 
View user's profile Send private message Send e-mail
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©