title: "Warning: session_start() [function.session-start]: Cannot send session cookie" error?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4523363/cannot-send-session-cookie-headers-already-sent">Cannot send session cookie - headers already sent</a><br>
    <a href="https://stackoverflow.com/questions/8028957/headers-already-sent-by-php">Headers already sent by PHP</a>  </p>
  </blockquote>
  
  
  
  <p>Somehow my website decided to break, so it did. <a href="http://artfulME.net" rel="nofollow noreferrer" title="It got broke...">artfulme.net</a> (My website) somehow got the error...</p>
  
  <p><strong>Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/artfulme/public_html/index.php:1) in /home/artfulme/public_html/index.php on line 1</strong></p>
  
  <p><strong>Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/artfulme/public_html/index.php:1) in /home/artfulme/public_html/index.php on line 1</strong></p>
  
  <p>I have no clue what happened. I was away camping, and when I got back I received that error every time I go to my website.</p>
  
  <p>Here is my full page code:</p>
  
  <pre><code>&lt;?php session_start(); $_SESSION['loginreturn']="../index.php";  
  
  include("scripts/mysql.php");?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;!-- Website Stuff --&gt;
  &lt;title&gt;artfulME&lt;/title&gt;
  &lt;link rel="shortcut icon" href="images/favicon.ico" /&gt;
  &lt;!-- CSS Stuff --&gt;
  &lt;style type="text/css"&gt;
  body,td,th {
      font-family: Arial, Helvetica, sans-serif;
      font-size: 16px;
      font-weight: lighter;
      color: #FFFFFF;
  }
  a:link {
      color: #6F8C37;
      text-decoration: none;
  }
  a:visited {
      text-decoration: none;
      color: #526828;
  }
  a:hover {
      text-decoration: underline;
      color: #ABC974;
  }
  a:active {
      text-decoration: none;
  }
  body {
      background-color: #7b7b7b;
  }
  &lt;/style&gt;
  &lt;link href="css/index.css" rel="stylesheet" type="text/css" /&gt;
  &lt;link href="css/login.css" rel="stylesheet" type="text/css" /&gt;
  &lt;!-- Script Stuff --&gt;
  &lt;script type="text/javascript"&gt;
  function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
      var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i&lt;a.length; i++)
      if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  }
  function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&amp;&amp;i&lt;a.length&amp;&amp;(x=a[i])&amp;&amp;x.oSrc;i++) x.src=x.oSrc;
  }
  function MM_findObj(n, d) { //v4.01
    var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))&gt;0&amp;&amp;parent.frames.length) {
      d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&amp;&amp;d.all) x=d.all[n]; for (i=0;!x&amp;&amp;i&lt;d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&amp;&amp;d.layers&amp;&amp;i&lt;d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x &amp;&amp; d.getElementById) x=d.getElementById(n); return x;
  }
  function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i&lt;(a.length-2);i+=3)
     if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  }
  
  function showElement(obj){
      document.getElementById(obj).style.display="block"; 
  }
  
  function hideElement(obj){
      document.getElementById(obj).style.display="none";
  }
  
  function restoreValue(obj){
      if(obj.value == ""){
          obj.value = obj.defaultValue;
      }
  }
  function clearValue(obj){
      if(obj.value == obj.defaultValue){
          obj.value = "";
      }
  }
  
  function changeTypeToPass(obj){
      if(obj.value != obj.defaultValue){
          obj.type = "password";
      }
  }
  function changeTypeToText(obj){
      if(obj.value == obj.defaultValue){
          obj.type = "text";
      }
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onload="MM_preloadImages('images/navi/homeover.png','images/navi/blogover.png','images/navi/mediaover.png','images/navi/blogover.PNG','images/navi/contactover.PNG')"&gt;
  &lt;div id="wrapper"&gt;
    &lt;p style="text-align: right; text-shadow: 1px 1px #000; height: 20px; margin-right: 3px"&gt;
      &lt;?php
          if(!isset($_SESSION['loggedin'])){
              echo "&lt;a href='javascript:void(0);' id='showLogin' onclick=\"showElement('login');\"&gt;Login&lt;/a&gt;\n";
          }else{
              if($_SESSION['username'] == "artfulME" || $_SESSION['username'] == "Admin"){
                  echo "&lt;strong&gt;Hello&lt;/strong&gt; &lt;a href='user/index.php'&gt;".$_SESSION['username']."&lt;/a&gt;!&amp;nbsp;&amp;nbsp; &lt;a href='post/index.php'&gt;Post&lt;/a&gt; | &lt;a href='userslist/index.php'&gt;View Users List&lt;/a&gt; | &lt;a href='upload/index.php'&gt;Upload&lt;/a&gt; | &lt;a onclick='document.logoutform.submit(); return false;' href='javascript:void(0);'&gt;Logout&lt;/a&gt;&lt;form style='display:none' id='logoutform' name='logoutform'  action='scripts/logout.php'&gt;&lt;/form&gt;";
                  $_SESSION['accesstoadmin'] = 1;
              }else{
                  echo "&lt;strong&gt;Hello&lt;/strong&gt; &lt;a href='user/index.php'&gt;".$_SESSION['username']."&lt;/a&gt;!&amp;nbsp;&amp;nbsp; &lt;a onclick='document.logoutform.submit(); return false;' href='javascript:void(0);'&gt;Logout&lt;/a&gt;&lt;form style='display:none' id='logoutform' name='logoutform'  action='scripts/logout.php'&gt;&lt;/form&gt;";
              }
          }
      ?&gt;&lt;/p&gt;
    &lt;div id="login"&gt;
      &lt;span style="text-align: right"&gt;&lt;p&gt;&lt;img src="images/logintop.png" width="31" height="15" alt="logintop" /&gt;&lt;/p&gt;&lt;/span&gt;
      &lt;div id="cont1"&gt;
      &lt;div style="height:5px"&gt;&lt;/div&gt;
        &lt;div id="cont2"&gt;
          &lt;form id="loginform" name="loginform" method="post" action="scripts/login.php"&gt;
            &lt;table width="100%" border="0" cellspacing="2" cellpadding="0"&gt;
              &lt;tr&gt;
                &lt;td&gt;&lt;input name="entlogin" type="text" id="entlogin" onfocus="clearValue(this);" onblur="restoreValue(this);" value="Username or Email" maxlength="50" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                &lt;td&gt;&lt;input name="entpass" type="text" id="entpass" onfocus="clearValue(this); changeTypeToPass(this);" onblur="restoreValue(this); changeTypeToText(this);" value="Password" maxlength="15" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                &lt;td&gt;&lt;a href="javascript:void(0);" onclick="document.loginform.submit(); return false;"&gt;Continue&lt;/a&gt; or &lt;a href="signup/index.php"&gt;Signup!&lt;/a&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                &lt;td&gt; &lt;a href="javascript:void(0);"&gt;&lt;/a&gt;&lt;a href="javascript:void(0);" onclick="hideElement('login');"&gt;Close&lt;/a&gt;&lt;/td&gt;
              &lt;/tr&gt;
            &lt;/table&gt;
          &lt;/form&gt;
        &lt;/div&gt;
        &lt;div style="height:5px"&gt;&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div id="header"&gt;&lt;img src="images/logo.png" alt="artfulME" width="500" height="143" border="0" usemap="#Map" /&gt;
      &lt;map name="Map" id="Map" title="Home | artfulME"&gt;
        &lt;area shape="rect" coords="6,37,311,108" href="index.php" alt="Home | artfulME" /&gt;
      &lt;/map&gt;
    &lt;/div&gt;
    &lt;div id="navi"&gt;
      &lt;p&gt;&lt;a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('HOME','','images/navi/homeover.png',1)"&gt;&lt;img src="images/navi/home.png" alt="HOME" name="HOME" width="150" height="40" border="0" id="HOME" /&gt;&lt;/a&gt;&lt;a href="blog/index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('BLOG','','images/navi/blogover.PNG',1)"&gt;&lt;img src="images/navi/blog.png" alt="BLOG" name="BLOG" width="145" height="40" border="0" id="BLOG" /&gt;&lt;/a&gt;&lt;a href="media/index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('MEDIA','','images/navi/mediaover.PNG',1)"&gt;&lt;img src="images/navi/media.png" alt="MEDIA" name="MEDIA" width="156" height="40" border="0" id="MEDIA" /&gt;&lt;/a&gt;&lt;a href="contact/index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('CONTACT','','images/navi/contactover.PNG',1)"&gt;&lt;img src="images/navi/contact.png" alt="CONTACT" name="CONTACT" width="205" height="40" border="0" id="CONTACT" /&gt;&lt;/a&gt;&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id="left"&gt;
      &lt;div id="block1"&gt;
        &lt;div id="container"&gt;
          &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt;
            &lt;tr&gt;
              &lt;td width="50%"&gt;&lt;h1&gt;Video to be here soon!&lt;/h1&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td&gt;&lt;p&gt;&lt;a href="javascript:void(0);" id="showAbout" onclick="hideElement('showAbout'); showElement('moreAbout');"&gt;More about me...&lt;/a&gt;&lt;/p&gt;
                &lt;p id="moreAbout" style="display:none"&gt;&lt;a href="#" onclick="showElement('showAbout'); hideElement('moreAbout');"&gt;Hide more about me...&lt;/a&gt;&lt;br /&gt;
                  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;I'm not just your ordinary person. Most male humans my age play video games, watch Youtube, eat, and sleep. I do all of those things, but I bring them up a level. I make video games (sometimes), try my best at editing Youtube videos, and I eat a lot and sleep normally.&lt;br /&gt;
                  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Also, I'm a &lt;em&gt;very&lt;/em&gt; good web-designer. This website is actually my best I'm sure... But, if you take a look at &lt;a href="http://www.wildwestgraniteaz.com"&gt;www.wildwestgraniteaz.com&lt;/a&gt; or &lt;a href="http://villaingogh.x10.mx"&gt;villaingogh.x10.mx&lt;/a&gt;, those are both my works.&lt;/p&gt;
                &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/table&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div id="block3"&gt;
        &lt;div id="container"&gt;
          &lt;h1&gt;Recent tweets...&lt;/h1&gt;
          &lt;p&gt;
            &lt;script src="http://widgets.twimg.com/j/2/widget.js"&gt;&lt;/script&gt;
            &lt;script&gt;
  new TWTR.Widget({
    version: 2,
    type: 'profile',
    rpp: 21,
    interval: 6000,
    width: 'auto',
    height: 300,
    theme: {
      shell: {
        background: '#282828',
        color: '#707071'
      },
      tweets: {
        background: '#282828',
        color: '#ffffff',
        links: '#708c37'
      }
    },
    features: {
      scrollbar: true,
      loop: false,
      live: false,
      hashtags: true,
      timestamp: true,
      avatars: false,
      behavior: 'all'
    }
  }).render().setUser('FethrdWlf').start();
    &lt;/script&gt;
          &lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div id="right"&gt;
      &lt;div id="block2"&gt;
        &lt;div id="container"&gt;
        &lt;?php
          if(isset($_SESSION['flagged'])){
              echo $_SESSION['flagged'];
              unset($_SESSION['flagged']);
          }elseif(isset($_SESSION['notflagged'])){
              echo $_SESSION['notflagged'];
              unset($_SESSION['notflagged']);
          }
        ?&gt;
          &lt;h1&gt;Most recent blog post...&lt;/h1&gt;
          &lt;?php include("scripts/latestpost.php"); ?&gt;
  &lt;/div&gt;
      &lt;/div&gt;
      &lt;div id="block4"&gt;
        &lt;div id="container"&gt;
          &lt;h1&gt;My latest Youtube video:&lt;/h1&gt;
          &lt;p&gt;
            &lt;iframe style="margin-bottom: 5px;" width="434" height="277" src="http://www.youtube.com/embed/dUyAA_CT-S0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
          &lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div id="copyright" style="background-color:#7b7b7b"&gt;
      &lt;p style="font-size: 12px"&gt;2011 &amp;copy; artfulME, Johnny McNeil&lt;/p&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I really don't know what to do.</p>