Author |
Message |
64bitguy
The Mouse Is Extension Of Arm

Joined: Mar 06, 2004
Posts: 1164
|
Posted:
Tue Oct 26, 2004 11:20 am |
|
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 |
_________________ Steph Benoit
100% Section 508 and W3C HTML5 and CSS Compliant (Truly) Code, because I love compliance. |
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Tue Oct 26, 2004 12:10 pm |
|
Try thisCode:AllowOverride Options
PHP_FLAG output_buffering On
or
AllowOverride All
PHP_FLAG output_buffering On
|
|
|
|
|
 |
64bitguy

|
Posted:
Tue Oct 26, 2004 12:17 pm |
|
Tried both ways.
Sorry, 500 Errors.
No permissions to do that. |
|
|
|
 |
Raven

|
Posted:
Tue Oct 26, 2004 12:21 pm |
|
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? |
|
|
|
 |
64bitguy

|
Posted:
Tue Oct 26, 2004 12:28 pm |
|
|
|
 |
Raven

|
Posted:
Tue Oct 26, 2004 12:28 pm |
|
If output buffering is not allowed then you can't use GT. Yet you are using GT. Something isn't adding up. |
|
|
|
 |
64bitguy

|
Posted:
Tue Oct 26, 2004 12:46 pm |
|
|
|
 |
Raven

|
Posted:
Tue Oct 26, 2004 12:50 pm |
|
Do you have gzip turned on in your forums? If so, turn it off. |
|
|
|
 |
64bitguy

|
Posted:
Tue Oct 26, 2004 6:18 pm |
|
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! |
|
|
|
 |
Raven

|
Posted:
Tue Oct 26, 2004 6:29 pm |
|
When you do a View Source, are there any blank lines before any HTML? |
|
|
|
 |
64bitguy

|
Posted:
Tue Oct 26, 2004 6:34 pm |
|
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? |
|
|
|
 |
Raven

|
Posted:
Tue Oct 26, 2004 6:43 pm |
|
That's what is probably causing it. get rid of that and you will probably be ok
First of all, try the DeepBlue theme to see if it's really the theme. |
|
|
|
 |
64bitguy

|
Posted:
Tue Oct 26, 2004 7:04 pm |
|
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! |
|
|
|
 |
Raven

|
Posted:
Tue Oct 26, 2004 10:10 pm |
|
Zip up and email me your theme and I'll take a look. |
|
|
|
 |
64bitguy

|
Posted:
Tue Oct 26, 2004 10:58 pm |
|
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! |
|
|
|
 |
chatserv
Member Emeritus

Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico
|
Posted:
Wed Oct 27, 2004 7:14 am |
|
Email the theme to Raven and send me your mainfile.php |
|
|
|
 |
|