Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Originally from <a href="http://paul.luminos.nl/update/471" rel="noreferrer">http://paul.luminos.nl/update/471</a>:</p> <blockquote> <p>The <a href="http://www.crimsonbase.com/" rel="noreferrer">CrimsonBase website</a> verifies downloads by passing them through a robust PHP script similar to the one published by Andrew Johnson in <a href="http://elements.nukamedia.com/v/Forcing-File-Downloads-with-PHP-Regardless-of-File-Type" rel="noreferrer">his article about PHP-controlled file downloads</a>.</p> <p>Andrew makes a very important comment at the end of the article:</p> <blockquote> <p>"If you compress files with Zlib, mod_deflate and so on the Content-Length header won't be accurate so you'll end up seeing "Unknown size" and "Unknown time remaining" when downloading files."</p> </blockquote> <p>I would like to stress this: if your browser doesn't appear to be obeying the headers generated by your PHP script—especially <code>Content-Length</code>—it is fairly likely that Apache's <code>mod_deflate</code> extension is enabled.</p> <p>You can easily disable it for a single script using the following line in an applicable <code>.htaccess</code> file:</p> <pre><code>SetEnvIfNoCase Request_URI ^/download\.php no-gzip dont-vary </code></pre> <p>where download.php is here assumed to be in the download script located in the server's root directory path (e.g. <code>www.crimsonbase.com/download.php</code>). (That's because the regular expression is <code>^/download\.php</code>.)</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload