First of all, I am not a programmer, I am having a problem with a php application that I did not write but I am trying to fix this one problem that I have. The interface of the program allow users to register and download files and that all works well. But, whenever a download exceeds 5 minutes, the download stops, (timesout). Any of the files can be downloaded fine without any problems as long as it does not take more than 5 mins. Also, I can download large files, more than five minutes from the web server (outisde of php) and they download fine. This should rule out the server and other variables. I assume this is a session timeout for the download. Interestingly, while the download is in progress, I cannot navigate to a new page in the browser within the app that I am logged into, until the download stops (timesout) then I can navigate the menus and such, or refresh the page.

In my php.ini file, I currently have "max_execution_time = 0" to stop the "session" from timing out on the download, but this does not help. Here is what my system is running:

Windows 2003 server
php ver 4.3.8
IIS 6

This seems to be a php problem, but might be the combination of php with Windows IIS, not sure. Does anyone have any suggestions on how to troubleshoot, or where the problem might be. (yeah, I know, Apache, and Linux would be a good start) Or how a download session is handled differently?

Thanks!
Grantmo

    I would like to add that the php app was originally designed for a linux/apache system. In some of the code there are "HTTP_SERVER_VARS" statements. Are these handled different on Apache/Linux as opposed to IIS/Windows?

    Any help or opinions would be great - just looking for some ideas.

      The problem is now solved - took me all day long, but the darn thing works now! (Snoopy dance) 😃

      Here's the deal:

      I had to change a setting in the IIS Metabase. I used the Metabase Editor 2.2. Its called metaedit and can be downloaded here:
      microsoft support page

      It says this version is only for IIS 4 and 5, but I used it on my IIS 6 and it worked fine. (Use at your own risk)

      Anyway, in the settings there are two locations for "cgitimeout" and they were both set to 300. I changed those to 900 (15 mins) and viola' it lets me download large files and exceed 5 mins. You will need to restart IIS in order for the change to take effect. Hope this saves someone the same headache I had today.

        Write a Reply...