vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   header already sent? (https://vborg.vbsupport.ru/showthread.php?t=74500)

arob42 01-17-2005 05:49 AM

header already sent?
 
I'm hacking the code and I am getting the following error message when I read a post:

Unable to add cookies, header already sent.
File: <new file that I added to forum/includes directory>
Line: 1

It lists a new php file that I am including in the functions_bbcodeparse.php via require_once(). I'm just trying to understand the code right now. Does anyone know what this error message means and what might cause it. The error message is displayed from around line 2466 in functions.php (search for 'cant_set_cookies'). Thanks.

Tekton 01-17-2005 05:59 AM

What are you adding? Any code we can see?

deathemperor 01-17-2005 11:26 AM

Quote:

Originally Posted by arob42
I'm hacking the code and I am getting the following error message when I read a post:

Unable to add cookies, header already sent.
File: <new file that I added to forum/includes directory>
Line: 1

It lists a new php file that I am including in the functions_bbcodeparse.php via require_once(). I'm just trying to understand the code right now. Does anyone know what this error message means and what might cause it. The error message is displayed from around line 2466 in functions.php (search for 'cant_set_cookies'). Thanks.

the File: <new file that I added to forum/includes directory> may have a space before <?php, open it and remove that space.

Zachery 01-17-2005 11:37 AM

Quote:

Originally Posted by arob42
I'm hacking the code and I am getting the following error message when I read a post:

Unable to add cookies, header already sent.
File: <new file that I added to forum/includes directory>
Line: 1

It lists a new php file that I am including in the functions_bbcodeparse.php via require_once(). I'm just trying to understand the code right now. Does anyone know what this error message means and what might cause it. The error message is displayed from around line 2466 in functions.php (search for 'cant_set_cookies'). Thanks.

We need to see the exact error 99% of the time to be able to help

arob42 01-17-2005 01:37 PM

Quote:

Originally Posted by deathemperor
the File: <new file that I added to forum/includes directory> may have a space before <?php, open it and remove that space.


The file not only has a space before it, it has a whole javascript function defined before it! The function is called by a new clickable image I'm placing into the text via the parse_bbcode2() function. I want to create a new popup window when the image is clicked. I'm guessing this is probably a bad place to put a javacript function definition. Any recommendation where to put it?

Except for this cookie problem, everthing else seems to be working. When the image is clicked the popup window appears with the contents I specified. I can give more details this evening. Got to go for awhile now. Thanks for all the help! --Robert

Tekton 01-17-2005 01:44 PM

You can't set cookies or header information after you already start sending stuff above it. Your PHP most likely has to go first.

deathemperor 01-17-2005 01:45 PM

if it's in vbulletin board, you get to place that javascript code in a proper template, there's no way it works if you place it in one of vbulletin's files, well if it works it's still not good to place it there.


All times are GMT. The time now is 05:03 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.00947 seconds
  • Memory Usage 1,724KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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