tags:

views:

20

answers:

2

I have a simple PHP upload page that when finished uploading runs a bit of JavaScript to show a form and 'save' button that I enter various bits of info in.

When I upload a large file 100-200mb I find that the upload hangs or seems to hang in that the javascript form never shows up.

Is there a way to set the script execution time for just that particular php page so that if that is the problem I can give it a lot of time to finish executing?

+1  A: 

You can use...

ini_set('max_execution_time', 0);

...to set the execution time limit for the currently executing script to 'unlimited'. Alternatively, you can set it a value greater than zero to specify a fixed limit (the unit is seconds).

Amber
A: 

There is no timeout while sending/uploading request to a web server. (However there may be limits to max_requet_size)

Apache restricts PHP script from taking infinite time. you should configure max_execution_time to be 0 using ini_set(). This time does not include time taken for the request to arrive on the webserver. First Apache/IIS catches your request and then only passed to PHP.

Ankit Jain