title: Send header before execution ends
body: <p>On my development server (CentOS 6.3, PHP 5.3) this works fine:</p>
  
  <pre><code>ignore_user_abort(true);
  header('Location: http://test.hooshmarketing.com/tools/test/test_pretty_output.php');
  //here a long script keeps executing in the background a few seconds
  </code></pre>
  
  <p>this works fine too</p>
  
  <pre><code>ob_implicit_flush(true);
  echo "foo"; //I see foo on the browser and...
  sleep (15);
  echo "bar"; //... about 15 seconds later I see bar on the browser
  </code></pre>
  
  <p>and this</p>
  
  <pre><code>ob_start();
  echo "foo"; //foo is written...
  sleep(10); 
  ob_flush(); //...about 10 second later, foo is sent
  echo "bar"; //bar is written...
  sleep(10); 
  ob_end_flush(); //...about 10 second later, bar is sent
  </code></pre>
  
  <p>On my contractor's production server (bluehost PHP 5.2 shared hosting) none of the three examples work. Nothing is sent to the client until the script finishes executing. I tried setting <code>ini_set('output_buffering', '0')</code> and <code>output_buffering = Off</code> on the script folder's php.ini file but no luck. Any ideas on why this could be happening?</p>