PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

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

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: 16987
Location: Kansas

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

Have you tried the FAQ for that error resolution?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

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

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..
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

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

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...?
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

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

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";
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

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

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
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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

?>
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

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

Sad Sad
It already have :



if(defined('INSIDE_MOD')) {
@include_once("mainfile.php");
} else {
@include_once("../../mainfile.php");
}
define('PHPBB_INSTALLED', true);
View user's profile Send private message
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

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

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
View user's profile Send private message Visit poster's website
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

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

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
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

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

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');
View user's profile Send private message
Susann
Moderator


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

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

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 to the forums!
View user's profile Send private message Visit poster's website
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

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

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....
View user's profile Send private message
Susann
Moderator


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

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

My Christmas present for you ! Smile
View user's profile Send private message Visit poster's website
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

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

Groovy
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

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

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..
View user's profile Send private message
Susann
Moderator


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

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

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
View user's profile Send private message Visit poster's website
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

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

hello susann,well we both checked with IE and firefox and i could see the site but others couldnt see it...
thats weird..
View user's profile Send private message
Susann
Moderator


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

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

Have you cleared your cache and what nuke version are you talking about ?
View user's profile Send private message Visit poster's website
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

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

yes...lol
i always clear my stuff when im checking stuff...
View user's profile Send private message
fujilives
New Member
New Member


Joined: Jul 20, 2006
Posts: 1

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

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: 6373
Location: Vsetin, Czech Republic

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

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 Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum