Stop data retention! Click here & act! Are you a webmaster and want to participate? Here you can find all necessary material for your website - Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:
Chris Karakas Online Forum Index Karakas Online
 FAQFAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Warning: Cannot add header information...in forums



 
Post new topic   Reply to topic
   Chris Karakas Online Forum Index -> PHP-Nuke Forum RSS Feed of this Forum
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea  View previous topic :: View next topic  
Author Message
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6262
Location: Outer Space

PostPosted: Thu Nov 27, 2003 3:37 am    Post subject: Warning: Cannot add header information...in forums
Reply with quote

Question Problem: You get errors of the form:

Code:

Warning: Cannot modify header information – headers already sent


when vieweing the forums.

Arrow Solution 1: Near the start of mainfile.php find:

Code:

42 = phpversion();
if (42 >= '4.0.4pl1' && strstr(Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1),'compatible')) {
    if (extension_loaded('zlib')) {
        ob_end_clean();
        ob_start('ob_gzhandler');
    }
} else if (42 > '4.0') {


and change it to:

Code:

42 = phpversion();
if (42 >= '4.0.4pl1')
{
    ob_start('ob_gzhandler');
}else if (42 > '4.0') {


Arrow Solution 2: Add the following line to a .htaccess file placed in your root PHP-Nuke directory:

Code:

PHP_FLAG output_buffering on


or if you have access to your php.ini, set:

Code:

output_buffering=on;


See Warning: Cannot modify header information on Forums and Cannot modify header information.
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
arcon
Private
Private


Joined: 19 Sep 2004
Posts: 1

PostPosted: Sun Sep 19, 2004 1:46 pm    Post subject:
Reply with quote

On my system the solution posted here did not work.
After messing around i found that this one worked.
(on php-nuke 7.1)
Enjoy
Arconious

Paste this into the mainfile instead of the one above if the one above does not work.

Code:
$phpversion;
if (42 >= '4.0.4pl1')
{
    ob_start('ob_gzhandler');
}else if (42 > '4.0') {
Back to top
View user's profile Send private message
dhyde79
Private
Private


Joined: 23 Oct 2004
Posts: 1

PostPosted: Sat Oct 23, 2004 5:34 am    Post subject: a problem
Reply with quote

on my system, with phpnuke7.4, neither of these solutions work, and there is no .htaccess file in the main directory to modify...

the closest line to the above one that is to be searched for, is as follows...

Code:

$phpver = phpversion();
if ($phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible')) {
    if (extension_loaded('zlib')) {
   ob_end_clean();
   ob_start('ob_gzhandler');
    }


please, if you could, tell me what I must do to fix this, I tried removing from the && to the first ) and the "if (extension_loaded('zlib')) { ob_end_clean();" and then I get an error that's a total fail to load the page at all because of a miscompile or something to that effect.
Back to top
View user's profile Send private message
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6262
Location: Outer Space

PostPosted: Tue Oct 26, 2004 6:48 pm    Post subject: Re: a problem
Reply with quote

dhyde79 wrote:
Open quoteon my system, with phpnuke7.4, neither of these solutions work, and there is no .htaccess file in the main directory to modify... Close quote


Fine. You can create one. Mr. Green
A .htaccess file is not part of PHP-Nuke.
Quote:
Open quotethe closest line to the above one that is to be searched for, is as follows...

Code:

$phpver = phpversion();
if ($phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible')) {
    if (extension_loaded('zlib')) {
   ob_end_clean();
   ob_start('ob_gzhandler');
    }
Close quote


OR try:

Code:

$phpver = phpversion();
if ($phpver >= '4.0.4pl1') {
    if (extension_loaded('zlib')) {
   ob_end_clean();
   ob_start('ob_gzhandler');
    }

_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
checksum
Private
Private


Joined: 24 Dec 2004
Posts: 1

PostPosted: Fri Dec 24, 2004 11:53 pm    Post subject:
Reply with quote

The funny thing is I only see the error with Firefox 1.0 when I am logged in.

But solution #2 fixed it for firefox.
Back to top
View user's profile Send private message
Wingman
Private
Private


Joined: 25 Oct 2005
Posts: 2

PostPosted: Tue Oct 25, 2005 10:55 pm    Post subject:
Reply with quote

My code was -->

$phpver = phpversion();
if ($phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible')) {
if (extension_loaded('zlib')) {
ob_end_clean();
ob_start('ob_gzhandler');
}
Aswell so i changed it to --->

$phpver = phpversion();
if ($phpver >= '4.0.4pl1') {
if (extension_loaded('zlib')) {
ob_end_clean();
ob_start('ob_gzhandler');
}

And still comes up.. any other idears? I am useing phpnuke 7.5
Cheers.
My phpnuke forum : http://www.frenzey.777mb.com/modules.php?name=Forums
Back to top
View user's profile Send private message
Jake-138
Private
Private


Joined: 11 Jul 2004
Posts: 4

PostPosted: Sun Jan 07, 2007 10:55 pm    Post subject:
Reply with quote

Wingman wrote:
Open quoteMy code was -->

$phpver = phpversion();
if ($phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible')) {
if (extension_loaded('zlib')) {
ob_end_clean();
ob_start('ob_gzhandler');
}
Aswell so i changed it to --->

$phpver = phpversion();
if ($phpver >= '4.0.4pl1') {
if (extension_loaded('zlib')) {
ob_end_clean();
ob_start('ob_gzhandler');
}

And still comes up.. any other idears? I am useing phpnuke 7.5
Cheers.
My phpnuke forum : http://www.frenzey.777mb.com/modules.php?name=ForumsClose quote


I am using PHPNuke 7.5 and this worked for me. Thanks! Very Happy
_________________
Jake #138
Back to top
View user's profile Send private message
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea 
Display posts from previous:   
Post new topic   Reply to topic
   Chris Karakas Online Forum Index -> PHP-Nuke Forum
Page 1 of 1
This page contains valid HTML 4.01 Transitional - click here to check it!
This page contains a valid CSS - click here to check it!

 

Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group