$this->file_size equal filesize($this->file_addr) , and this 1163748924 (1,08 GB)
But the browser thinks the file is 1.16.

I see that if the number of bytes to transfer in Gigabytes by dividing by 1024, you get a 1.08 (actual file size), but if by dividing by 1000, we get to 1.16. Given to browser (int)$file_size/1024/1024/1024*1000*1000*1000 - he saw 1.08 GB, but it has no effect.

If the Content-length header to remove, the download works.
With the files that are 500 MB, 50 MB and less is working. The file size of 1.08, or 1.16, 1,27 GB found the described problem.
The problem is this: the server gives the browser the file to the end and stops as it should. But the Browser thinks that the file is not transmitted to the end and believes that the transfer failed. The size of the downloaded file is of 1.08 and it opened quietly.
This assumption appeared after the file is transferred to the end, the browser is expecting something else from the server, and server just shuts down.
Here is the server code:
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.$this->file_name.'"');
header('Content-Length:' . $this->file_size);
flush();
ignore_user_abort(false);
ini_set('output_buffering', 0);
ini_set('zlib.output_compression', 0);
ob_end_flush();
$handle = fopen($this->file_addr, "rb");
while (!feof($handle)){
echo fread($handle, 8192);
ob_flush(); // flush output
flush();
}
fclose($handle);
Here's the headlines:
Cache-Control
no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection
keep-alive
Content-Description
File Transfer
Content-Disposition
attachment; filename="Файл_1.tif"
Content-Length
1163748924
Content-Type
image/tiff
Date
Wed, 18 May 2016 13:35:20 GMT
Expires
Thu, 19 Nov 1981 08:52:00 GMT
Pragma
no-cache
Server
nginx
X-Powered-By
PHP/5.4.45-0+deb7u2
content-transfer-encoding
binary
The result is the same.
The reference was read previously. Thank you. Does not help.
I guess in the end if something goes into the browser, or the end of file is not going away. - Sadie98 commented on July 9th 19 at 13:22
Browser does not just expect the larger size.
And try adding header('Content-Transfer-Encoding: binary'); in case he suddenly substituted "chunked" - there is just extra expected bytes wormed.
At the same time describe what you have nginx + apache or php-fpm or the like. - Daphne_Roob commented on July 9th 19 at 13:31