PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1156
Location: Sanbornton, NH USA

PostPosted: Tue Oct 26, 2004 11:20 am Reply with quote Back to top

Hi

PHP Warning: Cannot modify header information - headers already sent by ........

This problem has crept back in, and for the life of me, I can't remember what I did to fix it last time.

I know about:
Quote:
· How do i remove the Cannot Add Header Information error message?

If you have access to php.ini set:
output_buffering = On

else copy the following into a file:
PHP_FLAG output_buffering On
save it as .htaccess and upload to the same place mainfile.php is located.

Or add the following line to mainfile.php right after the file credits:
ini_set("output_buffering","1");


But unfortunately, I'm running in CGI mode and cannot modify and output_buffering settings in .htaccess without getting 500 page errors.

My question is, in a shared hosting situation with no ability to modify any of this information and output_buffers disabled what is the solution to eliminate this problem.

I was almost sure this had been asked and answered, I even thought it was in the users_guide, but after looking for a couple of hours, I still can't find the answer. I thought I had fixed this in my old 2.0.2, but it's back with 2.1.0.

Thanks
Steph
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


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

PostPosted: Tue Oct 26, 2004 12:10 pm Reply with quote Back to top

Try this
Code:
AllowOverride Options
PHP_FLAG output_buffering On

or

AllowOverride All
PHP_FLAG output_buffering On
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1156
Location: Sanbornton, NH USA

PostPosted: Tue Oct 26, 2004 12:17 pm Reply with quote Back to top

Tried both ways.

Sorry, 500 Errors.

No permissions to do that.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


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

PostPosted: Tue Oct 26, 2004 12:21 pm Reply with quote Back to top

There is absolutely no reason for your host not have output_buffering on. When you run phpinfo(), does it really show 'no value' in both columns?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1156
Location: Sanbornton, NH USA

PostPosted: Tue Oct 26, 2004 12:28 pm Reply with quote Back to top

yup
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


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

PostPosted: Tue Oct 26, 2004 12:28 pm Reply with quote Back to top

If output buffering is not allowed then you can't use GT. Yet you are using GT. Something isn't adding up.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1156
Location: Sanbornton, NH USA

PostPosted: Tue Oct 26, 2004 12:46 pm Reply with quote Back to top

Funny, isn't it?
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


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

PostPosted: Tue Oct 26, 2004 12:50 pm Reply with quote Back to top

Do you have gzip turned on in your forums? If so, turn it off.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1156
Location: Sanbornton, NH USA

PostPosted: Tue Oct 26, 2004 6:18 pm Reply with quote Back to top

In forums admin, it has always been disabled.

In fact, it wasn't enabled at all (there was a mainfile issue) but now it is. I also got rid of the default junk in there to prevent a couple unmentionable exploits, but can it be assumed that Sentinel will cover by butt on these anyway?

Further, if I do a gzip test now, on php files it shows as disabled, on .html files it shows as enabled (including forums.html). This is a tad confusing to me. What's funny is, my index.html increased from .23 to .22 average load time (not very much of an improvement); however, my forums.html page load time went from .19 to an average .50.

hmmmm.

Anyway, none of this was apparently related to my problem since at that time, gzip wasn't enabled (even though I thought it was) and has always been disabled in Forums admin.

Any other ideas?

Thanks!
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


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

PostPosted: Tue Oct 26, 2004 6:29 pm Reply with quote Back to top

When you do a View Source, are there any blank lines before any HTML?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1156
Location: Sanbornton, NH USA

PostPosted: Tue Oct 26, 2004 6:34 pm Reply with quote Back to top

As a matter of fact.... YES...

In my index.php / index.html pages, but no-where else.

I've been trying to track this down for WEEKS...

If you do a view source on these pages, you get 6 blank lines before seeing anything.

I've looked everywhere trying to figure out what is causing it without success.

It looks like it is definately related to my theme, but I can't nail down WHERE in my theme the problem resides. I've posted several messages back over Mtechnik over the past few months, but they've never answered any of them. Support is pretty much out the window over there.

Any ideas where to look?
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


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

PostPosted: Tue Oct 26, 2004 6:43 pm Reply with quote Back to top

That's what is probably causing it. get rid of that and you will probably be ok Wink

First of all, try the DeepBlue theme to see if it's really the theme.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1156
Location: Sanbornton, NH USA

PostPosted: Tue Oct 26, 2004 7:04 pm Reply with quote Back to top

Yeah, I did that, that's how I confirmed it to be a theme issue... When I used deepblue, the blank lines go away.

I just have no idea though where they are coming from in my existing theme.

What's odd is that it is only on the news page that I have this problem. If I take the news page out of home, it goes away (and only happens on the news page)... So wherever the problem is, it is directly attributable only to the news page.

Ideas on where I should look for it?

Thanks!
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


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

PostPosted: Tue Oct 26, 2004 10:10 pm Reply with quote Back to top

Zip up and email me your theme and I'll take a look.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1156
Location: Sanbornton, NH USA

PostPosted: Tue Oct 26, 2004 10:58 pm Reply with quote Back to top

Okay... I finally figured that the only way I was going to fix this was to try to replicate it so I moved everything over to my 7.0 beta site (that doesn't run googletap) and what I found was... wait a second.. it doesn't happed here!

So next, I went in and disabled GT (I simply remarked out the GT reference in the header.php and then the footer.php) and sure enough, the problem goes away.

What I can't figure out is why it is only affecting my existing Theme (and not deepblue for example) and further, why it is only attacking the news module.

So I started looking through my GT-NextGen code and I'll be cursed to the underworld if I can figure our where it's dying.

Any ideas on where I should start looking?

It's time like this that I wish Bill were around... argh.. lol

Thanks!
View user's profile Send private message Visit poster's website
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1396
Location: Puerto Rico

PostPosted: Wed Oct 27, 2004 7:14 am Reply with quote Back to top

Email the theme to Raven and send me your mainfile.php
View user's profile Send private message Visit poster's website
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

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