|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66556 Readfile() + big file + slow download = 500, windows server 2012, php 5.5.8
Submitted: 2014-01-22 21:41 UTC Modified: 2014-07-08 08:34 UTC
Avg. Score:4.4 ± 0.8
Reproduced:5 of 5 (100.0%)
Same Version:1 (20.0%)
Same OS:2 (40.0%)
From: oli dot laurel at arcor dot de Assigned:
Status: Duplicate Package: IIS related
PHP Version: 5.5.8 OS: Windows Server 2012
Private report: No CVE-ID: None
 [2014-01-22 21:41 UTC] oli dot laurel at arcor dot de
sorry for open a new bug, but i can't reopen #65453.
problem still exist.

create files with following content:
[client, c:\tmp\wget.cmd]
"C:\Program Files (x86)\GnuWin32\bin\wget.exe" --limit-rate=20000 --server-response

[server, d:\www\index.php]
$track = "movie.mpg";
if (file_exists($track)) {
    header("Content-Type: audio/mpeg");
    header('Content-Length: ' . filesize($track));
    header('Content-Disposition: inline; filename="movie.mpg"');
    header('X-Pad: avoid browser bug');
    header('Cache-Control: no-cache');
} else {
    header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found', true, 404);
    echo "no file";


[server, d:\www\movie.mpg]
any file greater than 60mb

now start download by executing wget.cmd
effect: download will always be interrupted

os: windows server 2012 / windows server 2008R2
PHP: 5.5.8

Test script:
see top

Expected result:
download should not be interrupted

Actual result:
download will always be interrupted


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-07 16:00 UTC] cristina dot matos at gmail dot com
Hello there, was this issue ever resolved? I am having the same problem. I actually see the download happening but the zip file is corrupted.
 [2014-07-08 05:53 UTC] oli dot laurel at arcor dot de
Windows Server 2012 r2 + iis + php 5.5.14, Problem still exists
 [2014-07-08 08:33 UTC]
@oli, have you tried the suggestion from @jonas in bug #65453? That in the stack overflow link about increasing activityTimeout. Gonna test it with his suggestion, too. Also, please lets continue to use the original ticket.

 [2014-07-08 08:34 UTC]
-Status: Open +Status: Duplicate
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Nov 28 12:01:27 2023 UTC