Answers.Body: <p>That error means that <em>something</em> is being output to the browser before it's supposed to be.  In this case, it's cookie information (or more specifically, the removal of a cookie by adding one with the same name, no value and an expired date).</p>
  
  <p>The question is, what's calling <code>removeCookie</code>?  If you enable <a href="https://craftcms.com/docs/config-settings#devMode" rel="nofollow">devMode</a>, then the error should present with a stack trace where you can follow the programs execution to see what's leading up to that call.  My guess is something in the Import plugin (or maybe another plugin) is the culprit.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-26T06:18:02.673Z
Answers.Text: Ok - so likely issue with a plugin - on checking the Stack Trace after the error I see one of the stages is
  #11 C:\sitepath\public\index.php(21): require_once()
  REQUEST_URI=/index.php/admin/actions/tasks/getTaskInfo
  
  And only task in the task manager is the import routine.
Answers.UserDisplayName: mmc501
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-26T03:43:07.220Z
Answers.LastActivityDate: 2016-02-26T03:43:07.220Z
Answers.UserDisplayName: Brad Bell
Body: <p>Trying to run an import using the Import Plugin but I keep getting errors.
  Checking the Logs the error is:</p>
  
  <p>Cannot modify header information - headers already sent (C:\sitepath\craft\app\framework\web\CHttpRequest.php:1490) </p>
  
  <p>The line 1490 is the first setcookie line in the code below:</p>
  
  <p>I have tried downloading the latest version of Craft but has made no difference.</p>
  
  <pre><code>protected function removeCookie($cookie)
  {
      if(version_compare(PHP_VERSION,'5.2.0','&gt;='))
          setcookie($cookie-&gt;name,'',0,$cookie-&gt;path,$cookie-&gt;domain,$cookie-&gt;secure,$cookie-&gt;httpOnly);
      else
          setcookie($cookie-&gt;name,'',0,$cookie-&gt;path,$cookie-&gt;domain,$cookie-&gt;secure);
  }
  </code></pre>
  
  <p>Is this a Craft bug or what is the cause of this error?</p>
  
Tags: <error-message><error><plugin-import>
Title: PHP Error - Cannot modify header information - headers already sent
ThreadText: # PHP Error - Cannot modify header information - headers already sent
  
  (Asked by: username_0 on 2016-02-25)
  
  Trying to run an import using the Import Plugin but I keep getting errors.
  Checking the Logs the error is:
  
  Cannot modify header information - headers already sent (C:\sitepath\craft\app\framework\web\CHttpRequest.php:1490)
  
  The line 1490 is the first setcookie line in the code below:
  
  I have tried downloading the latest version of Craft but has made no difference.
  
  ```
  protected function removeCookie($cookie)
  {
      if(version_compare(PHP_VERSION,'5.2.0','>='))
          setcookie($cookie->name,'',0,$cookie->path,$cookie->domain,$cookie->secure,$cookie->httpOnly);
      else
          setcookie($cookie->name,'',0,$cookie->path,$cookie->domain,$cookie->secure);
  }
  
  ```
  
  Is this a Craft bug or what is the cause of this error?
  
  **Tags:** error-message, error, plugin-import
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-02-26. Score: 1
  
  That error means that *something* is being output to the browser before it's supposed to be. In this case, it's cookie information (or more specifically, the removal of a cookie by adding one with the same name, no value and an expired date).
  
  The question is, what's calling `removeCookie`? If you enable [devMode](https://craftcms.com/docs/config-settings#devMode), then the error should present with a stack trace where you can follow the programs execution to see what's leading up to that call. My guess is something in the Import plugin (or maybe another plugin) is the culprit.
  
  > **Comments:**
  > **username_0**: Ok - so likely issue with a plugin - on checking the Stack Trace after the error I see one of the stages is #11 C:\sitepath\public\index.php(21): require_once() REQUEST_URI=/index.php/admin/actions/tasks/getTaskInfo  And only task in the task manager is the import routine.  
  
  ---
  
  