vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   online.php header problem (https://vborg.vbsupport.ru/showthread.php?t=38153)

tkeil69575 05-02-2002 11:31 AM

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

Admin 05-02-2002 11:33 AM

What the second line of online.php? Could it be online.php looks like this:
Code:

1:
2:
3: <?php
4: error_reporting(7);

(i.e you have blank lines at the top)

tkeil69575 05-02-2002 11:37 AM

Hi Chen,

well yes 1 blank line before <?php.

PHP Code:

2: <?php
3
:
4// Yes we realize that there are a lot of hard coded English words in this file.
5// Language abstraction is planned for vB v3.0
6
7error_reporting(7);

sorry, had another look, jus now. Guess that the bug?

Sparkz 05-02-2002 11:42 AM

That looks about right...

Could it be the setcookie()-function that fails for some reason and produces some kind of error output?

tkeil69575 05-02-2002 11:56 AM

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 :)

Sparkz 05-02-2002 12:11 PM

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.

Admin 05-02-2002 12:42 PM

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.

tkeil69575 05-02-2002 12:43 PM

Hi Sparks, Hi Chen,

ok, thanks for explaining. :)

looks like the problem is solved now. Thanks again to both of you!

regards Tina

Dio Br@ndo 11-10-2002 01:46 PM

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
  • Page Generation 0.01014 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete