Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-17-2005, 05:49 AM
arob42 arob42 is offline
 
Join Date: Nov 2004
Location: Dallas
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 01-17-2005, 05:59 AM
Tekton Tekton is offline
 
Join Date: Jun 2004
Location: Wisconsin
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What are you adding? Any code we can see?
Reply With Quote
  #3  
Old 01-17-2005, 11:26 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 01-17-2005, 11:37 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 01-17-2005, 01:37 PM
arob42 arob42 is offline
 
Join Date: Nov 2004
Location: Dallas
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 01-17-2005, 01:44 PM
Tekton Tekton is offline
 
Join Date: Jun 2004
Location: Wisconsin
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can't set cookies or header information after you already start sending stuff above it. Your PHP most likely has to go first.
Reply With Quote
  #7  
Old 01-17-2005, 01:45 PM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:29 PM.


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.04617 seconds
  • Memory Usage 2,218KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete