title: For php flush - how to disable gzip for specific file?
body: <p>I have a ajax call to somefile.php . i want the php script to do a simple task and than send back data to the user, and only than do very time consuming tasks. so i need to flush the output after the first simple task. it doesn't work, probably because i have gzip enables.</p>
  
  <p>I definitely don't want to disable gzip across all the vhost, and also not in all the folder where somefile.php is. i just want to disable it for this specific file. is that possible?</p>
  
  <p>EDIT:</p>
  
  <p>this is what i've included in my apache conf:</p>
  
  <pre><code>&lt;FilesMatch \.php$&gt;
      SetEnv no-gzip 1
  &lt;/FilesMatch&gt;
  </code></pre>
  
  <p>this is my php script:</p>
  
  <pre><code>&lt;?php
  $sucesss = @apache_setenv('no-gzip', 1);
  @ini_set('zlib.output_compression', 0);
  @ini_set('implicit_flush', 1);
  
  ob_start();
  
  for($i=0;$i&lt;10;$i++)
  {
      echo 'printing...';
      ob_flush();
      flush();
  
      sleep(1);
  }
  ?&gt;
  </code></pre>
  
  <p>it doesn't work. i still see all the output together after 10 seconds.</p>