DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • September 28, 2016, 03:06:54 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: sending headers error  (Read 2801 times)
0 Members and 1 Guest are viewing this topic.
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« on: March 14, 2004, 11:34:21 AM »

Code:
Warning: session_register(): Cannot send session cookie - headers already sent by (output started at /guilds-clans.php:2) in /common.php on line 1886

Warning: session_register(): Cannot send session cache limiter - headers already sent (output started at /guilds-clans.php:2) in /common.php on line 1886

i get this error on this file, and another file (swap the filenames ofcouse).

any ideas of what i need to comment out or change?  i have tried quite a few things
Logged

tifter
Guest
« Reply #1 on: March 14, 2004, 12:01:25 PM »

line 1886 in common. what does it say?

Regards

tifter.
Logged
Kendaer
Guest
« Reply #2 on: March 14, 2004, 12:03:55 PM »

This error is *always* caused by having something which causes output to be sent to the browser before it gets a chance to send the cookie/header information.

It even tells you exactly where this is occuring (guild-clans.php, line 2).

Usually this means you have whitespace outside of the <? ?> blocks which denote the PHP.

Remove that extraneous white space and things will start working (assuming nothing else is wrong).
Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #3 on: March 14, 2004, 12:30:15 PM »

gad, i feel like such a noob for not including the lines.  I meant to, i swear.

beginning of guilds-clans.php:
Code:
<?
require_once "common.php";
addcommentary();

1886 of common.php:
Code:
session_register("session");

beginning of clan.php  (error says line 4):
Code:
<?
require_once("common.php");
require_once("lib/nltoappon.php");
require_once("lib/commentary.php");
require_once("lib/sanitize.php");

I tried including /lib/commentary.php in common.php and removing the addcommentary function on common.php  that didnt work.

i tried commenting out addcommentary() in guilds-clans.php  still got the error.

Logged

silentrob
Guest
« Reply #4 on: March 14, 2004, 01:29:27 PM »

Did you read what Kendaer wrote? I'll repeat:

"This error is *always* caused by having something which causes output to be sent to the browser before it gets a chance to send the cookie/header information.

It even tells you exactly where this is occuring (guild-clans.php, line 2).

Usually this means you have whitespace outside of the <? ?> blocks which denote the PHP."

Double check that your guild-clans.php doesn't start with a blank line before the <?

Looking at your source it's kinda hard to tell, but it looks like that's what happening (although it's kinda hard to tell via source.php

Checking out the HTML source via http://www.sixf00t4.com/dragon/source.php?url=/dragon/guilds-clans.php and scrolling past the file lists, I see:

Code:
</ul><h1><a name='source'>Source of: /dragon/guilds-clans.php</a></h1><code><font color="#000000">
<br /><font color="#0000BB">&lt;?
<br /></font><font color="#007700">require_once </font><font color="#DD0000">"common.php"</font><font color="#007700">;

Compare that with
http://www.sixf00t4.com/dragon/source.php?url=/dragon/forest.php

Code:
</ul><h1><a name='source'>Source of: /dragon/forest.php</a></h1><code><font color="#000000">
<font color="#0000BB">&lt;?
<br /></font><font color="#007700">require_once </font><font color="#DD0000">"common.php"</font><font color="#007700">;

And notice the difference between the middle line The first file has an additional <br /> at the front, indicating a blank line at the start of the file.
« Last Edit: March 14, 2004, 01:31:11 PM by silentrob » Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #5 on: March 14, 2004, 01:51:40 PM »

Undecided  well that was it.  i did read what Ken wrote, and i did check.  perhaps i just didnt upload?  i dunno.  but that was it!  gracias!
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Who's Online
60 Guests, 1 User
RaynDarren
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search