SEO-Board: Free, Fast and Search Engine Optimization Friendly Forum Script
»User: »Password:   Remember Me? 
SEO-Board Forum Software Community / General / Support / Error >> Warning: Cannot modify header
Posted:  07 May 2005 01:01
Hi,
I've just installed the script but I'm getting the following error when I try to run install.php

Warning: Cannot modify header information - headers already sent by seo-board_options.php:100
in install.php on line 9

Any ideas?
Posted:  07 May 2005 07:42
Have you modified install.php? Like putting spaces before the opening <?php tag. This tag must be at the very beginning of the php file.
Posted:  08 May 2005 05:58
Hi,
No, I have not modified any file except the file specified in the setup instructions.
Posted:  08 May 2005 08:41
If you get the warning message, there must be some output before setting the headers. There are 4 lines of code before the header commands - 2 including files. Maybe you've made a syntax error in seo-board_options. Move these 2 lines before the require commands.
Code:

error_reporting(E_ALL);
set_magic_quotes_runtime(0);
You should see an error that you must correct. Maybe forgot some quote or ; in seo-board_options
Posted:  08 May 2005 15:44
Doesn't appier to be any type of syntax error.  I've double checked the files and there isn't anything in front of the <?php tag.  Can you explain what you mean by this "There are 4 lines of code before the header commands - 2 including files"
Posted:  08 May 2005 17:13
The header command puts info in the html header of a page. This header is sent before any html. Notice the code:
Code:

<?php

require ('seo-board_options.php');
include ('./lang/eng.php');

error_reporting(E_ALL);
set_magic_quotes_runtime(0);

header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Expires: Mon,26 Jul 1997 05:00:00 GMT");
When the header command executes, it outputs a warning. This is possible only when something is outputed before that. Php would output text when you tell it to do so or when some error happens and php outputs it. That's why a suggested you put the error_reporting code on the top of the file.

Anyway, it does not matter. Just delete the 3 header commands and run it again. That should fix the problem.
Posted:  08 May 2005 19:34
Ok,
I deleted the 3 header commands and got the "Installation successful message.  However now, when I try and go to the index.php page, I get the error again.

FYI, the error_reporting code was already in the install.php file.  Exactly where you show it above.  Should I move it into another place, like above the <?php

Sorry to be such a pain, I'm usually pretty good at installing this type of thing!
Posted:  08 May 2005 19:56
That means that either seo-board_options.php or eng.php outputs character(s). Check if <? are the first symbols of these 2 files. Also check if ?> are at the very end of the php files.
Posted:  08 May 2005 20:00
Yes, <? is at the beginning of each and ?> is at the end of each.
Posted:  08 May 2005 20:08
Wow, I think I found the problem.  There were a few 'spacebar' spaces after the ?> in the seo-board file.

I deleted the spaces, now everthing appears to be working... I didn't realize it was that sensitive