FIle Upload/Download Times Out

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
meseptiamus
Forum Newbie
Posts: 2
Joined: Mon Nov 24, 2008 3:10 pm

FIle Upload/Download Times Out

Post by meseptiamus »

I am having a problem with file transfers using a PHP script timing out.

Currently using phpinfo() I have HTTP_KEEP_ALIVE 300. From what I have read this means an http session will stay alive for 300 seconds and then drop from inactivity. From my tests this makes sense as my uploads and downloads time out after 5 minutes or 300 seconds. Unfortunately all my attempts at changing this setting have failed. I have tried to change it using commands to over ride it in the upload script to no avail. I have tried to set things in php.ini. The only place I have not changed anything is in the web server. Hold onto your hats because...

System - IIS 5, PHP 5.2.5

I have no choice on the server, it is what it is. How do I change the http timeout on an IIS server, or over ride it? Can I do it from a script and if so how. Or is it better to increase the timeout using some setting in IIS? If so what is the setting and where do I find it. I have to give very specific instructions to the server owner, I do not have access to it to make changes.

Any help would be great.

Thanks
Mesept
elsint
Forum Newbie
Posts: 7
Joined: Tue Jul 12, 2005 8:22 am

Re: FIle Upload/Download Times Out

Post by elsint »

I have the same problem. I'm trying to increase it, but I can't do it. On IIS 6 there's a place where you enable the HTTP KEEP_ALIVEs and set the seconds, but it doesn't apply to HTTP_KEEP_ALIVE php is getting.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: FIle Upload/Download Times Out

Post by Eran »

Did you check your script execution time limit in your PHP configuration? you can also set it at run time using set_time_limit() - http://www.php.net/set_time_limit
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: FIle Upload/Download Times Out

Post by VladSun »

I think KEEP ALIVE is related to TCP/IP connections pool and not the HTTP itself. In order to use keep alive, it's needed that it is supported by both sides (i.e. server and client). There are browsers that do not support keep alive, so if your logic is applied such browser must be not able to make any file uploads ;)

So, as pytrin suggested, you should check PHP config time limits.
There are 10 types of people in this world, those who understand binary and those who don't
meseptiamus
Forum Newbie
Posts: 2
Joined: Mon Nov 24, 2008 3:10 pm

Re: FIle Upload/Download Times Out

Post by meseptiamus »

I should have posted my solution earlier. We found out what was causing it. There is a CGI timeout setting in IIS. As I don't have control over the server I did not change it so can't give you exact instructions on how to change it. From what I read it is a global setting for all hosted web sites, it cannot be set for each one. To change it if I recall correctly you right click in the IIS manager what ever that is, go to properties and some where in there on one of the tabs is the CGI timeout which is set to 300 sec by default. Change it to what ever you like and the uploads should happen just fine. At least ours did.

Thanks
Mesept
Post Reply