title: OB Start before Session Start to Avoid Header Already Sent Error in PHP?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2919569/use-case-for-output-buffering-as-the-correct-solution-to-headers-already-sent">Use case for output buffering as the correct solution to “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>To avoid 'headers already sent' error message can I use obstart before session start in PHP, like below:</p>
  
  <pre><code>// db information here
  ob_start();
  session_start();
  </code></pre>
  
  <p>Is this a good practice to use in every PHP project to avoid 'header already sent error' or it is for special cases?</p>