Downloading files on IIS

General discussions related to php

Moderators: macek, egami, gesf

arhood
New php-forum User
New php-forum User
Posts: 2
Joined: Tue Feb 21, 2012 9:04 am

Downloading files on IIS

Postby arhood » Thu Oct 11, 2012 4:36 am

I have a PHP script that downloads some quite large files (about 300Mb).

This works on my Linux Server but has been moved to a windows server and now the downloads seem to timeout after about 100 secs.

I have tried everything that I can think of and even the ISP (Fasthosts) has run out of ideas.
The old PHP version was 5.1.2. The new one is 5.1.6. The core settings in both ini files seem to match up.


Before I dive into the IIS setup, has anybody had this problem or can anybody suggest anything?

The new server is 2008 SP1 running IIS7

The script is below.

<?php
$file = $_GET[dfile];
$fname = $_GET[nfile];
$fileSize = filesize( $file );

set_time_limit(0);

header("Content-Type: application/force-download");
header("Content-Length: $fileSize");

header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment; filename=\"$fname\"");

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Connection: close");

readfile( $file );

?>

arhood
New php-forum User
New php-forum User
Posts: 2
Joined: Tue Feb 21, 2012 9:04 am

Re: Downloading files on IIS

Postby arhood » Mon Oct 15, 2012 2:17 am

I have found the answer.
There is a fastCGI timeout setting.

I anybody else gets a similar problem the answer is here:-

http://www.rezolve.co.uk/fastcgi-process-exceded-timeout


Return to “PHP General”

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron