Closed perryflynn closed 11 years ago
Are you sure, that the max_execution_time limit is the problem? I tried to upload a larger file at the demo site and it took several minutes. The upload was successfull, although the max_execution_time is 30 seconds.
The PHP docs say that stream operations are not counted towards the max_execution_time limit (http://php.net/manual/en/function.set-time-limit.php).
Anyway, if this is really the problem in your environment, there are two options:
I have found the solution. My webserver (nginx) have a timeout for fastcgi connections.
http {
fastcgi_connect_timeout 60;
fastcgi_send_timeout 3600;
fastcgi_read_timeout 3600;
}
Solved. :-)
Another required option:
http {
client_max_body_size 20000M;
}
Good job :)
Hi Ivan,
i try to upload files >3GB.
My problem is the max_execution_time of PHP. After x secounds the upload will abort by the backend.
Have you any suggestion to solve this problem? Maybe a chunked upload?
My source code: Backend: https://github.com/agentp/webshelf-file-explorer/blob/master/lib/controller/filesystemcontroller.php#L179 Frontend: https://github.com/agentp/webshelf-file-explorer/blob/master/app/view/UploadWindow.js#L19
I think setting the execution time of php to 2 hours or more is not a good idea.