"The connection with the server was reset"
| From: | Ronny Salomonsen | Date: | Sun, 20 Jan 2002 09:12:56 +0000 |
| Subject: | "The connection with the server was reset" | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-12218@lists.php.net to get a copy of this message | ||
I've created a simple downloadscript that handles file downloads (it
redirects to a file that cannot be accessed through internet.
After 2% I get the following errormessage:
Internet Explorer cannot download basedata.mdb from [removed]
The connection with the server was reset
The script has downloaded 411 kb of 17.6 MB, and other people has a similar
problem. Sometimes it downloads about 5 MB and closes the downloading window
and says it has successfully downloaded the file.
What could be wrong?
I'm running PHP 4.1.1 on a MS IIS 5.0 server. The code is as follows:
<?php
set_time_limit(0);
error_reporting(E_ALL);
$get = "basedata.mdb";
// Handle download-requests
header("Content-Type: application/force-download\n");
header("Content-Disposition: attachment; filename=\"$get\"\n");
header("Content-Description: GAB database\n");
header("Content-Transfer-Encoding: binary\n");
header("Content-Length: " . filesize($get));
$fd=fopen($get,'r');
fpassthru($fd);
readfile($get);
exit;
?>