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

Reply
 
Thread Tools Display Modes
  #21  
Old 10-10-2008, 05:09 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

"Unable to add cookies" means you have sent output to the browser before the script could send cookie headers. Whitespace is considered output.
Reply With Quote
  #22  
Old 10-10-2008, 08:56 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please also post the contents of index-test.php.
Reply With Quote
  #23  
Old 10-10-2008, 11:44 PM
DandD DandD is offline
 
Join Date: Sep 2008
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey guys,

Thanks to all of you for your continued support. I've stripped down the code to the bare minimum. Currently this is the entire code for the index-test.php page:

=========
<?php chdir('/home/xxxx/public_html/forum'); ?>
<link href="http://www.lahabraevents.com/forum/clientscript/vbulletin_css/style-b391d83b-00002.css" rel="stylesheet" type="text/css">
<?php include ("http://www.lahabraevents.com/forum/calendar.php"); ?>
=========

As previously suggested I added to the headinclude template:

=========
base href="http://www.lahabraevents.com/forum/"
=========

I've tried various combinations of code, changing the order, making sure to delete white space, etc. but still can't get this to work. (I have also tried putting the two php code elements within the same php tags with no difference. The reason they are separate is I need to use some table tags for layout.) As the code is above, the calendar loads on the page and there are no error codes but the login status and calendar view links are not correct. If I make the include path relative ("calendar.php"), we get the error:

"Unable to add cookies, header already sent.
File: /home/xxxx/public_html/index-test.php
Line: 3"

I understand the idea there may be conflict due to duplicate header calls. I just don't know how to avoid it. As Dismounted previously suggested, I've tried using the calendar.php code on the index page rather than using an include but I don't know how to delete the header call - IF that is what I need to do.

Once again, I appreciate any other ideas or suggestons.
David
Reply With Quote
  #24  
Old 10-11-2008, 04:12 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In your code:
Code:
<?php chdir('/home/xxxx/public_html/forum'); ?>
<link href="http://www.lahabraevents.com/forum/clientscript/vbulletin_css/style-b391d83b-00002.css" rel="stylesheet" type="text/css">
<?php include ("http://www.lahabraevents.com/forum/calendar.php"); ?>
Your second line is output. global.php (which is included in calendar.php), will most likely set cookies. That can't happen because you've already sent output to the browser.
Reply With Quote
  #25  
Old 10-11-2008, 06:10 AM
DandD DandD is offline
 
Join Date: Sep 2008
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
In your code:
Code:
<?php chdir('/home/xxxx/public_html/forum'); ?>
<link href="http://www.lahabraevents.com/forum/clientscript/vbulletin_css/style-b391d83b-00002.css" rel="stylesheet" type="text/css">
<?php include ("http://www.lahabraevents.com/forum/calendar.php"); ?>
Your second line is output. global.php (which is included in calendar.php), will most likely set cookies. That can't happen because you've already sent output to the browser.
By the second line, I assume you mean the link href code. After more testing I can get things to work but it appears I cannot have ANY html between the two above lines of php, not even some table tags where I wanted to place the include file. And any html on the page after the php is ignored - my added footer does not display. Not the end of the world - at least we have fixed the main issue.

Thanks again everyone for all the help. I really do appreciate it.

David
Reply With Quote
  #26  
Old 10-11-2008, 10:41 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DandD View Post
By the second line, I assume you mean the link href code. After more testing I can get things to work but it appears I cannot have ANY html between the two above lines of php, not even some table tags where I wanted to place the include file.
That is correct. Any character sent to the browser is considered output. HTML is sent directly to the browser.
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 07:50 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.03933 seconds
  • Memory Usage 2,220KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete