Eduardo M. Bragatto | 11 Nov 1997 18:54
Picon
Favicon

time out when uploading.. PLEASE HELP ME :)

I'm using a simple php script called upload.php, here's the source:

<?php

move_uploaded_file($userfile, "/my/dir");

?>

But I keep getting an error message:

Fatal error: Maximum execution time of 20 seconds exceeded in 
D:\dominios\E\escolas-es\spe\upload.php on line 3

Then, I've tried to increase the time limit with the "set_time_limit"
(the server isn't running on safe-mode, so I can use it, I've tested
this function and it really works):

<?php

set_time_limit(600);

move_uploaded_file($userfile, "/my/dir");

?>

But the error doesn't stop! When I send small files, it works, but 
larges files, that takes more than 20 seconds to upload, results in
this error. It seems that the php script begins only AFTER upload,
so when the files are big, it waits until the time exceed. How can I
workaround this problem? Please help me out!
(Continue reading)


Gmane