Hi,
I know that this error message comes many times and the problem is that we echo or print something out on the page before header().
I have installed phpbb on my server it added a database, everything is fine. Then I would like to add the classifieds module. I have followed the instructions. Basically, I had to include a file of the ads mod constants into the constants.php, then added some links to the template. It all made sense.
But now, I get this message.
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\xampp\htdocs\phpBB2\ads_mod\ads_constants.php:54) in C:\xampp\xampp\htdocs\phpBB2\includes\sessions.php on line 254
On line 254 of session.php it wants to send a cookie, but it can not, because it has benn sent on ine 54 of ads_constants.php. BUT!!! in line 54 of ads_constants.php it is the end of the script. " ?> " This is there!!!
Please, help if you have any idea of what can be wrong!
Page 1 of 1
Help with understanding error message
#2
Posted 17 March 2010 - 07:29 AM
Watch out for odd spaces that have been sent.
Sometimes, even a space before the first ' <%php' or in your case probably between the first bit of php code and the second bit.
Sometimes, even a space before the first ' <%php' or in your case probably between the first bit of php code and the second bit.
#3
Posted 17 March 2010 - 09:30 AM
TopShopper, on 17 March 2010 - 07:29 AM, said:
Watch out for odd spaces that have been sent.
Sometimes, even a space before the first ' <%php' or in your case probably between the first bit of php code and the second bit.
Sometimes, even a space before the first ' <%php' or in your case probably between the first bit of php code and the second bit.
I have checked the spaces and there are none. I have an idea but I might be wrong. There are several messages like: "die('Hacking attempt')"
or " message_die(GENERAL_MESSAGE, $message)"
Can these cause the problem if they are triggered?
I can not see exactly these, but I just did something for fun... I copied and pastes the whole content of ads_constants.php in constants.php. It should be the same as include isn't it?
The header errors disappeared from the firt page and thousand of other erro messages came up eg "message_die(GENERAL_MESSAGE, $message)"
So something must be wrong it can not access a folder and tables... as I saw, it exseeds my experience and knowledge to solve this...
#4
Posted 18 March 2010 - 12:56 AM
Usually you can see the problem by looking at the source of the rendered page. If there is any HTML whatsoever before the error message, that should put you on the right track.
The problem probably isn't the die() call you mention, because that would stop PHP dead in its tracks, so PHP would never try to send the header, so you would never see an error message
The problem probably isn't the die() call you mention, because that would stop PHP dead in its tracks, so PHP would never try to send the header, so you would never see an error message
#5
Posted 18 March 2010 - 07:04 AM
Milli05, on 17 March 2010 - 07:13 AM, said:
On line 254 of session.php it wants to send a cookie, but it can not, because it has benn sent on ine 54 of ads_constants.php. BUT!!! in line 54 of ads_constants.php it is the end of the script. " ?> " This is there!!!
Are you absolutely sure that there is no space or newline after the " ?> " because I can see one.
Share this topic:
Page 1 of 1
Help
















