Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-13-2004, 06:00 PM   PM User | #1
Ultragames
Regular Coder

 
Join Date: Aug 2002
Location: Oregon, United States of America
Posts: 882
Thanks: 1
Thanked 9 Times in 9 Posts
Ultragames has a little shameless behaviour in the past
Header Sent Error, Session Start IS at top

This is what i have at the very top of the page.
PHP Code:
<?php
session_start
();
header("Cache-control: private");
?>
Putting this code at the very very top of the page has fixed my problem of getting the error:
Warning: session_start(): Cannot send session cookie - headers already sent by ~~~~~~

I have checked, and made sure there isn't a second session start or anything of that kind on the page. The only thing that deals with sessions is something like:

PHP Code:
$Blah $_SESSION['BlahBlah']; 
What can i do to get rid of this?
__________________
If I'm postin here, I NEED YOUR HELP!!
Ultragames is offline   Reply With Quote
Old 10-13-2004, 06:15 PM   PM User | #2
raf
Master Coder


 
Join Date: Jul 2002
Posts: 6,589
Thanks: 0
Thanked 0 Times in 0 Posts
raf will become famous soon enoughraf will become famous soon enough
Is the 'problem' (whatever is was) fixed, or did you make a typo?

is suppose your problem (if any) would be caused by the third line (header(...))
__________________
Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html
raf is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 +1. The time now is 10:28 PM.


Advertisement
Log in to turn off these ads.