Hmmm... to me it sounds like it times-out.  I know you've got
set_time_limit(0), but have you removed max_execution_time from the php.ini
file?  I think that if it's there then it still gets used.  Otherwise I'd
look into IIS's timeout settings (don't know about them) which might very
well override PHP's timeouts.

These are only hypotheses, but can you humour me and look into them?

I'm a bit confused as to why you're passing the file through twice though?
Also, are these files definately not binary? In which case the fopen
attribute is wrong.

Ross

-----Original Message-----
From: Ronny Salomonsen [mailto:[EMAIL PROTECTED]]
Sent: 20 January 2002 09:13
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] "The connection with the server was reset"


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;
?>



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to