Author |
Message |
hitwalker
Sells PC To Pay For Divorce
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined:
Posts: 5661
|
Posted:
Sat Dec 24, 2005 5:43 pm |
|
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? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
Site Admin/Owner
![](modules/Forums/images/avatars/45030c033f18773153cd2.gif)
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Sat Dec 24, 2005 6:14 pm |
|
Have you tried the FAQ for that error resolution? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Dec 24, 2005 6:18 pm |
|
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.. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Dec 24, 2005 10:54 pm |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 25, 2005 6:55 am |
|
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...? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 25, 2005 9:28 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 25, 2005 10:01 am |
|
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"; |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 25, 2005 10:15 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 25, 2005 10:22 am |
|
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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 25, 2005 11:07 am |
|
In modules/Forums/config.php youshould have code similar to thisCode:<?php
@include("../../mainfile.php");
define('PHPBB_INSTALLED', true);
?>
|
Try changing it to
Code:<?php
@include_once("../../mainfile.php");
define('PHPBB_INSTALLED', true);
?>
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 25, 2005 12:44 pm |
|
It already have :
if(defined('INSIDE_MOD')) {
@include_once("mainfile.php");
} else {
@include_once("../../mainfile.php");
}
define('PHPBB_INSTALLED', true); |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
evaders99
Former Moderator in Good Standing
![](modules/Forums/images/avatars/803d73f6452557b947721.jpg)
Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Sun Dec 25, 2005 1:47 pm |
|
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 |
_________________ - Only registered users can see links on this board! Get registered or login! -
Need help? Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 25, 2005 2:34 pm |
|
Well that doesnt work also
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](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 25, 2005 3:41 pm |
|
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'); |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Susann
Moderator
![](modules/Forums/images/avatars/4e3210db4efb891870d79.gif)
Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Sun Dec 25, 2005 4:29 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 25, 2005 4:42 pm |
|
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.... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Susann
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 25, 2005 4:45 pm |
|
My Christmas present for you ! ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 25, 2005 4:49 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 26, 2005 10:34 am |
|
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.. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Susann
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 26, 2005 11:15 am |
|
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 |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 26, 2005 11:18 am |
|
hello susann,well we both checked with IE and firefox and i could see the site but others couldnt see it...
thats weird.. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Susann
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 26, 2005 11:22 am |
|
Have you cleared your cache and what nuke version are you talking about ? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 26, 2005 3:06 pm |
|
yes...lol
i always clear my stuff when im checking stuff... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
fujilives
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jul 20, 2006
Posts: 1
|
Posted:
Thu Jul 20, 2006 2:39 pm |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Thu Jul 20, 2006 3:21 pm |
|
This is your first post AND you used the search first? Well done, outsanding effort on your part.
Welcome to Ravens PHP Scripts! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|