FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


*Super Duper Urgent* "Headers Already Sent"





polly-gone
Okay, so I have this little problem. I have this design project deadline on Monday, I am running out of time, and I am having a problem.

Please Check out: http://nick.anderegg.pastebin.com/m7dba761d, which is index.php

Then http://nick.anderegg.pastebin.com/m7fc23bc9 which is home.php.

When I try to log in, I get:

Quote:


Warning: Cannot modify header information - headers already sent by (output started at /home/pollygon/domains/atomicdingo.us/public_html/k11r/index.php:35) in /home/pollygon/domains/atomicdingo.us/public_html/k11r/main/login.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /home/pollygon/domains/atomicdingo.us/public_html/k11r/index.php:35) in /home/pollygon/domains/atomicdingo.us/public_html/k11r/main/login.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /home/pollygon/domains/atomicdingo.us/public_html/k11r/index.php:35) in /home/pollygon/domains/atomicdingo.us/public_html/k11r/main/login.php on line 25

Warning: Cannot modify header information - headers already sent by (output started at /home/pollygon/domains/atomicdingo.us/public_html/k11r/index.php:35) in /home/pollygon/domains/atomicdingo.us/public_html/k11r/main/login.php on line 26


Why is it saying this and how can I fix it?

Thank you so much in advance,

-Nick Smile Smile Smile
rvec
It means the script already send output to the browser and is trying to change header information (which should be done before sending any output). The solution would be to make sure you don't send anything to the browser before using any of these functions:
session_start()
setcookie()
header()

and I think also some ssl commands and some other less used commands.

Output is also a space before <?php even in an included file.

I'd start looking at index.php line 35
polly-gone
so how would I do it? Would the set cookie script have to be in a different file. How I would I do it?

-Nick Smile Smile Smile
imagefree
polly-gone wrote:
so how would I do it? Would the set cookie script have to be in a different file. How I would I do it?

-Nick Smile Smile Smile


is the code that you provided above is complete?
polly-gone
Wait. I figured it out.

*Please Lock*

-Nick Smile Smile Smile
mathiaus
-close-
Related topics
HELP: setcookie() and header problems
phpbb
phpbb problem....
Header("Location: PROBLEM");
Sessions
My upgraded message board
an annoying problem - PLEASE help
PHP Sessions
redirect(append_sid()); - need help !
phpBB2 Avatar Error
Can't restore database
[URGENT]Simple authentification does not work!!!
*Really Super Duper Urgent* Cookies and Authentication
header already sent? (and now introducing a mysql problem)
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.