Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by pgowder pgowder is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 01-04-2002 Last Update: Never Installs: 0
 
No support by the author.

I'm creating an addition to my vbulletin.

I'm getting this error:

Quote:
Warning: Cannot add header information - headers already sent by (output started at /home/sites/home/web/gathering/pw_event_whois.php:3) in /home/sites/home/web/gathering/admin/functions.php on line 1490
Here is the code:

PHP Code:
<?
require('global.php');

if ($bbuserinfo[userid]==0) {

//Send user to the registration page
show_nopermission();
} else {

//Enter the username into pw_whois


mysql_query("insert into pw_whois (eventid, username, userid) values ('7', '$bbuserinfo[username]', '$bbuserinfo[userid]')");


//Send the user back to the calendar


echo ("<html><body onload=document.location.href='http://www.powwows.com/gathering/pw_calendar/pw_event_display.php?eventid=7'></body></html>");

}
?>
Thanks

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-04-2002, 07:53 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Two things to check:

a) make sure there are no blanks after the closing > at the end of the file.

b) set your cookie domain in your control panel. I have no idea why this has an effect, but it has worked for others.

Amy
Reply With Quote
  #3  
Old 01-04-2002, 08:00 PM
pgowder's Avatar
pgowder pgowder is offline
 
Join Date: Nov 2001
Location: West Columbia, SC
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do I set the cookie domain?? What should it be set to??
Reply With Quote
  #4  
Old 01-05-2002, 11:37 PM
Simon Moon Simon Moon is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Little hint, use the stuff from vB to access the DB. Makes your life easier
Reply With Quote
  #5  
Old 01-06-2002, 01:39 AM
pgowder's Avatar
pgowder pgowder is offline
 
Join Date: Nov 2001
Location: West Columbia, SC
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm using global??? What else can I use??
Reply With Quote
  #6  
Old 01-06-2002, 02:04 AM
Simon Moon Simon Moon is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, there are 2 things specially i dont like in that thing

PHP Code:
mysql_query("insert into pw_whois (eventid, username, userid) values ('7', '$bbuserinfo[username]', '$bbuserinfo[userid]')");

//Send the user back to the calendar

echo ("<html><body onload=document.location.href='http://www.powwows.com/gathering/pw_calendar/pw_event_display.php?eventid=7'></body></html>"); 
You can make thse 2 nicer if you FIRST use the database class of the board and SECOND if you redirect by header (wich is smother).

Would look like this for your example:
PHP Code:
$DB_site->query("insert into pw_whois (eventid, username, userid) values ('7', '$bbuserinfo[username]', '$bbuserinfo[userid]')");

//Send the user back to the calendar

header ("Location: [url]http://www.powwows.com/gathering/pw_calendar/pw_event_display.php?eventid=7[/url]"); 
But i would not do a full url in these scripts, make it more variable, this saves you headaches. Feel free to copy paste this.
The reason to use the class is, that you use the data from the class AND use the same error reporting tools. If something happens, you get informed...
Reply With Quote
  #7  
Old 01-06-2002, 03:38 AM
pgowder's Avatar
pgowder pgowder is offline
 
Join Date: Nov 2001
Location: West Columbia, SC
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried to use the headers, but I got errors about headers already being set. I'll change the other part.

Thanks
Reply With Quote
  #8  
Old 01-22-2002, 03:26 PM
pgowder's Avatar
pgowder pgowder is offline
 
Join Date: Nov 2001
Location: West Columbia, SC
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm still having problems with the cannot set headers error:

Warning: Cannot add header information - headers already sent by (output started at /home/sites/home/web/gathering/pw_event_whois.php:3) in /home/sites/home/web/gathering/admin/functions.php on line 1490

Any ideas??
Reply With Quote
  #9  
Old 01-29-2002, 01:52 PM
pgowder's Avatar
pgowder pgowder is offline
 
Join Date: Nov 2001
Location: West Columbia, SC
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can someone help??

Why do I get this header error?
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:49 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04683 seconds
  • Memory Usage 2,285KB
  • Queries Executed 24 (?)
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
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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