![]() |
online.php header problem
Hi all,
i have the following parse error showing up from time to time. Its not always there though and I cant really simulate it. Sometimes it just goes away if I call up online.php again, but its bugging me badly. Warning: Cannot add header information - headers already sent by (output started at /home/blabal.../forums/online.php:2) in /home/blabla.../forums/admin/functions.php on line 1601 Line 1601 in functions.php looks like this: 1597 if ($cookiedomain) { 1598 setcookie($name, $value, $expire, $cookiepath, 1599 $cookiedomain, $secure); 1600 } else { 1601 setcookie($name, $value, $expire, $cookiepath, '', $secure); 1602 } Any of you have an idea what might be causing this? regards Tina |
What the second line of online.php? Could it be online.php looks like this:
Code:
1: |
Hi Chen,
well yes 1 blank line before <?php. PHP Code:
|
That looks about right...
Could it be the setcookie()-function that fails for some reason and produces some kind of error output? |
Hi Sparkz,
thanks for the reply. Well, yes that was my first thought, but somehow I doubt it because of the Warning regarding the header. I mean what has the cookiesetting to do with the header warning. According to my understanding of line 1601, this comes into effect if I dont have my domainname set as the cookiepath in the adminsettings of my board, which I havent because I'm only running one board on the server, thus having that set to "/". mmh. well I've removed the blank line before <?php now - maybe that was it ? Was that what your where trying to tell me Chen? Tina :) |
If some function fails and this causes any kind of output to be sent, you cannot send any more headers afterwards.
But having blank lines before <?php could also cause it. |
Having the blank line actually sent a blank line to the browser, as output. And as we all know, you can't send HTTP headers after you start sending output to the browser, and since setcookie() sends a header - it failed.
|
Hi Sparks, Hi Chen,
ok, thanks for explaining. :) looks like the problem is solved now. Thanks again to both of you! regards Tina |
Thx for explaining! :)
|
All times are GMT. The time now is 01:27 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|