title: php setcookie() not working - Cannot modify header information
body: <p>I found the reason why I got this error, there was nothing wrong with my code, so I deleted it from my post.</p>
  
  <p>My php page was encoded as UTF-8, but it had to be encoded as UTF-8 WITHOUT BOM (Byte Order Mark).</p>
  
  <p>As I understand it, the BOM is interpreted as an output, or at least creates one.</p>
  
  <p>Thanks for all of your answers, my question was a duplicate, I apologize for that, I looked at the other posts but not far enough. Thanks !</p>