vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Unable to add cookies, header already sent. NEED HELP (https://vborg.vbsupport.ru/showthread.php?t=190261)

DieselMinded 09-07-2008 02:37 PM

Unable to add cookies, header already sent. NEED HELP
 
Unable to add cookies, header already sent.
File: /home/dieselminded/dieselbombers.com/html/profile.php
Line: 332

What do i do to fix this

--------------- Added [DATE]1220804662[/DATE] at [TIME]1220804662[/TIME] ---------------

I think i found the problem ,

Texas Holdem Poker

My Old Profile.php Excerpt

// everything is good - send the singly-hashed MD5 to the password update routine
$userdata->set('password', $vbulletin->GPC['newpassword']);
// Notify PlugInPoker Server of Password Change
$fp = fopen("http://www.pluginpoker.com/popup/changepassword.asp?c=1202&phpu=" . $vbulletin->userinfo['username'] . "&oldp=" . $vbulletin->GPC['currentpassword_md5'] . "&newp=" . $vbulletin->GPC['newpassword_md5'], "r");
if (!$fp) {
echo "ERROR: $errno - $errstr\n";
} else {
fclose($fp);
}
// Update cookie if we have one
$vbulletin->input->clean_array_gpc('c', array(
COOKIE_PREFIX . 'password' => TYPE_STR,
COOKIE_PREFIX . 'userid' => TYPE_UINT)
);

I over wrote it with the newest version profile.php

// everything is good - send the singly-hashed MD5 to the password update routine
$userdata->set('password', $vbulletin->GPC['newpassword']);

// Update cookie if we have one
$vbulletin->input->clean_array_gpc('c', array(
COOKIE_PREFIX . 'password' => TYPE_STR,
COOKIE_PREFIX . 'userid' => TYPE_UINT)
);

The Code added was to also change the password in Plug In poker when a user changed there password in Vbulletin ,

Do you think i have fixed this issue ?

UaECasher 09-07-2008 03:27 PM

This error happen when you don't write the set cookie command at the start of the file you have to write it 1st thing nothing before it including white space. If this happen after installing a mod ask the creator to fix it

DieselMinded 09-07-2008 03:37 PM

iu think i may of fixed it by removing the .php edits

Opserty 09-07-2008 04:16 PM

The problem is the this line:
PHP Code:

   echo "ERROR: $errno - $errstr\n"

You can't echo in vBulletin. You should add errors to a variable then display them in a template.

p.s. Use PHP tags when posting PHP in future.

DieselMinded 09-07-2008 06:00 PM

so there code is wrong (Pluginpokers)

Opserty 09-07-2008 07:14 PM

Well it isn't default vBulletin code... ;)


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