ohdang888 Posted March 2, 2008 Share Posted March 2, 2008 one question.... i have <?php session_start(); ?> on the "topmenu.php" which is included on every single page. but on the first page i am going to (the homepage) i am getting this error: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\index.php:2) in C:\xampp\htdocs\include\topmenu.php on line 1 I'm logged out, and cleared all cookies and data in my IE, but its still doing that error whats wrong? P.S.- thanks for helping me! Link to comment https://forums.phpfreaks.com/topic/94081-session-problem/ Share on other sites More sharing options...
pocobueno1388 Posted March 2, 2008 Share Posted March 2, 2008 Will you post some code from topmenu.php? Link to comment https://forums.phpfreaks.com/topic/94081-session-problem/#findComment-481952 Share on other sites More sharing options...
ohdang888 Posted March 2, 2008 Author Share Posted March 2, 2008 <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <BODY bgcolor="#666666"> <body leftmargin="0"> <body topmargin="0"> <font size=1> <Br> <Br> <center> <font size=3> <div style="background-color:#C0C0C0;overflow: hidden; width:920px;height:100%"> <Center> <table> <tr><td> <div style="width:908px"> <div id="leftColumn" style="float:left; width:173px;"> <Br> <IMG SRC="../thegameking.jpg" WIDTH="173" HEIGHT="49" BORDER="0" ALT="TheGameKing.Net - Free Online Gaming, Games"> <font size=2><center> <?php if(strlen($_SESSION['id']) == 0){ echo '<A HREF="login.php" style="color:black">Login</a> | <A HREF="register.php" style="color:black">Register</A>'; } else { echo '<A HREF="member_home.php" style="color:black">MyHome</A> | <A HREF="logout.php" style="color:black">LogOut</A> '; }?> </div> thanks for helping! Link to comment https://forums.phpfreaks.com/topic/94081-session-problem/#findComment-481954 Share on other sites More sharing options...
pocobueno1388 Posted March 2, 2008 Share Posted March 2, 2008 Oops, I meant index.php. Sorry. Link to comment https://forums.phpfreaks.com/topic/94081-session-problem/#findComment-481956 Share on other sites More sharing options...
ohdang888 Posted March 2, 2008 Author Share Posted March 2, 2008 nvm. Solved it. thanks, Link to comment https://forums.phpfreaks.com/topic/94081-session-problem/#findComment-481961 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.