Keeping PHP-CGI alive [Answered]RSS

1 reply

Last post May 01, 2010 01:48 AM by don.raman

  • Keeping PHP-CGI alive

    Apr 30, 2010 06:12 PM|Streamworks|LINK

     Hi folks,

     

    Wondering if I could toss out my situation and see if there are any ideas on how to work around it.

     I am using PHP as a FastCGI module with Windows Web Server 2008 R2 and IIS 7 (I think it's 7 not 7.5).   I wrote a PHP script that is used to download files - the problem I am having is that the php-cgi.exe process is automatically terminated in some situations before the script has sent the whole file.  I have set php-cgi fastcgi module with a Idle Timout to one hour just to combat this.... but this seems unsafe to me (plus some customer claim they still cannot download the whole file in an hour). 

     So what I am wondering is as I use a 'while' loop in PHP to send the file to IIS in chunks, I thought maybe there is something I can do with each loop to ping IIS basically to tell it to not time out and to keep running as long as the file is being sent.

     Any ideas on what in PHP can be used to do such a thing?

     

    Thanks,

    Chris

  • Re: Keeping PHP-CGI alive

    May 01, 2010 01:48 AM|don.raman|LINK

    Hi,

    Streamworks

     I am using PHP as a FastCGI module with Windows Web Server 2008 R2 and IIS 7 (I think it's 7 not 7.5).

    Windows 2008 R2 has IIS 7.5 and not IIS 7.

    For script timeout see http://blogs.iis.net/donraman/archive/2010/02/08/troubleshoot-my-php-script-is-timing-out.aspx.

    Thanks,

    Don.