There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer audio black screen boot bsod computer connection crash css dell display driver drivers email error excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware network networking nvidia outlook outlook 2003 outlook express partition printer problem ram router slow software sound trojan usb video virus vista windows windows vista windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
PHP Error: Cannot send session cookie - headers already sent


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
gamewolf's Avatar
Senior Member with 130 posts.
 
Join Date: Nov 2007
Experience: Advanced
04-Jul-2008, 10:43 PM #1
PHP Error: Cannot send session cookie - headers already sent
I am building a php webpage and I keep getting Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent.

So I have just a basic page:

<?php session_start(); ?>
<html>
<head>
<title></title>
</head>

<body>
</body>
</html>

and It still gives me this error. There is nothing to conflict with it and nothing is being sent to the page before the session_start(). What is wrong? Thanks.
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,250 posts.
 
Join Date: Oct 2006
05-Jul-2008, 07:33 AM #2
Make sure its a plain ANSI file, not utf-8 or anything.

Open notepad, insert the code above, and save it as plain ansi. It should work fine.
gamewolf's Avatar
Senior Member with 130 posts.
 
Join Date: Nov 2007
Experience: Advanced
07-Jul-2008, 10:14 PM #3
K I got it fixed. Thanks.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 02:11 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.