PHP Headers Already Sent Error
<p>The following code is not working even after having inserted ob_start(), and ob_flush();</p>

<p>I keep getting the PHP headers already sent error</p>

<pre><code>&lt;?php 
ob_start();
include("/home/www/pheincl/config.php");
include("/home/www/pheincl/common_functions.php");
$num = $_SERVER['HTTP_X_UP_CALLING_LINE_ID'];

if($num == null)
{
  $num = $_SERVER['HTTP_X_MSISDN'];

  if($num == null)
  {
    $num = $_GET["msisdn"];

  }
}

if(strlen($num) &gt; 3)   
{
  $sql="select count(*) from members where msisdn='$num'";
  $r=fetch($sql);

  if($r[0] &gt; 0)
  {
    $r1=fetch("select pin from members where msisdn='$num'");

    if(strlen($r1[pin]) &gt; 2)
    {
      header("Location:http://location1.com?msisdn=$num&amp;pin=$r1[pin]");
    }
  }
  else
  {
    header("Location:http://location2.com&amp;msisdn=$num");
  }   
}
else 
{
  header("Location:location3.com/phe/log.php");
}

ob_end_flush();
?&gt;
</code></pre>

<p>UPDATE: After some further testing it looks like this problem is specific to my servier. Someone I know put this on their server and it worked fine</p>
