set_time_limit and httpd.conf Timeout

I am trying to upload a 100 - 300 Meg files to a php script.

I did set_time_limit(0).

But the Apache still timed out.

So I am about to modify the apache timeout from
Timeout 300 to Timeout 1000

But that could be painful on the server…
How to I set the apache server timeout only for upload.php ?

How can I do this within a .htaccess file or within the upload.php script ?

Thanks in advance !

set_time_limit does not work if your PHP is in safe mode

btw are you sure that you have set correctly your post_max_size and upload_max_filesize

Put it in a separate directory and use a htacess?

OK,

I changed my php.ini settings to these settings:

post_max_size = 600M –> in php.ini
set_time_limit(0) in upload.php
upload_max_filesize = 600M
then I went to the ; Resource Limits ;

and changed
max_execution_time = 0 ; 0 = unlimited - normally 60 seconds
max_input_time = 0 ; 0 = unlimited - normally 30 seconds

and it worked ! 500 Megs were uploaded
if I could limit these changes to only one file like upload.php, then it would be perfect

Well if you have max_execution_time = 0, you don’t need set_time_limit(0) :wink:

see in doc. which of them could be set using ini_set