vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Cannot modify header information - headers already sent (https://vborg.vbsupport.ru/showthread.php?t=60151)

TheLab 01-13-2004 10:17 AM

Cannot modify header information - headers already sent
 
Hello people :)

I was looking my error log on the server and i found this line:

Code:

[Tue Jan 13 05:49:57 2004] [error] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/***/***/announcement.php:1) in /home/***/***/admin/functions.php on line 1667
In the admin/functions.php on line 1667 i have this one:

Code:

setcookie($name, $value, $expire, $cookiepath, $cookiedomain, $secure);
The lines near it says:

Code:

  if (defined('USE_COOKIE_WORKAROUND')) {
    // It's been reported that there's a bug in PHP 4.2.0/4.2.1 with Apache 2 causing setcookie() to not work correctly.
    // This is the workaround. If you need to use this code, please add:
    //      define('USE_COOKIE_WORKAROUND', 1);
    // to your config.php.

    if (!$value) {
      // need to do this so IE deletes the cookie correctly
      $expire = time() - 31536001;
      $value = 'deleted';
    }
    $cookieheader = "Set-Cookie: $name=".urlencode($value);
    if ($expire) {
            $cookieheader .= '; expires='.gmdate('D, d-M-Y H:i:s', $expire).' GMT';
    }
    if ($cookiepath) {
      $cookieheader .= "; path=$cookiepath";
    }
    if ($cookiedomain) {
      $cookieheader .= "; domain=$cookiedomain";
    }
    if ($secure) {
      $cookieheader .= '; secure';
    }
    header($cookieheader, false); // force multiple headers of same type
  } else {
    setcookie($name, $value, $expire, $cookiepath, $cookiedomain, $secure);
  }

}


Any ideas on that?! :ermm:

Dean C 01-13-2004 11:52 AM

TheLab,

You are currently showing up as unlicensed. To be able to download hacks and/or receive support here at vBulletin.org, we ask you to please click here (vB-germany users click here) and enter your email address, to show us that you are licensed.

You will need to use your customer number and password (which will be in the email you got when you paid for your license) to access that page. Please note that your email is case sensitive.

Thank you.

TheLab 01-13-2004 05:11 PM

Now it should be ok, i changed my email and i forgot i had to put it on the vb customer site.

TheLab 01-14-2004 06:09 AM

Any ideas on the problem?

TheLab 01-17-2004 10:12 AM

Never mind.. i figured it out

assassingod 01-17-2004 10:16 AM

These errors are usually occured by whitespaces after the ?> in the file mentioned. Try removing an spaces ?> may have after it.

Dean C 01-17-2004 11:44 AM

Or before the <?php too :)

TheLab 01-17-2004 12:14 PM

Yeap, that was the error.. i search all my phps and i had a ton of empty spaces lol.

Thanx guys :)

Zachery 01-17-2004 05:45 PM

for future refrence :)

https://vborg.vbsupport.ru/showthread.php?t=60233


All times are GMT. The time now is 08:38 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.01787 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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