The first starting point containing infos how to deal with big file uploads is the official documentation available here:
Here are the most important settings in a quick overview:
- You need to set the following two parameters inside your PHP configuration file (php.ini), using your own desired file size values:
upload_max_filesize = 16G post_max_size = 16G
- You will also need to increase the PHP timeout values in your php.ini otherwise you will see timeouts-related errors. These are expressed in seconds:
max_input_time 3600 max_execution_time 3600
- Also, your temp file or partition (defined in php.ini with the parameter upload_tmp_dir) has to be big enough to hold multiple parallel uploads from multiple users; e.g. if the max upload size is 10GB and the average number of users uploading at the same time is 100: temp space has to hold at least 10x100 GB.
- Also, output Buffering must be turned off in your php.ini, or PHP will return memory-related errors:
output_buffering = 0.
- The mod_reqtimeout Apache module could also stop large uploads from completing. If you’re using this module and getting failed uploads of large files either disable it in your Apache config or raise the configured RequestReadTimeout timeouts.
If you can’t find the needed infos there continue with this informations:
If you have problems uploading files in general:
Check that you don’t have any weird Rewrite rules configured (e.g.
RewriteEngine On RewriteCond ...as posted in some erroneous tutorials on the web).
In case you get an error message mentioning MAX_FILE_SIZE when uploading: Check that you’re not facing the problem of a disabled disk_free_space function described in this thread: https://forum.owncloud.org/viewtopic.php?f=3&t=3058; there is a workaround described in this post: https://forum.owncloud.org/viewtopic.php?f=3&t=3058&start=10#p7773
Check the Known problems with php / webserver modules or configs
Check your Logfiles
If uploading via WebDAV check How to fix CalDAV|CardDAV|WebDAV problems
If you’re on IIS check that the problematic files don’t contain a plus (+) sign in the filename
If you have problems uploading files over a certain size limit, make sure
In case you’re using PHP via FCGI: Make sure you’ve set the maximum request length appropriately, check e.g. this thread: https://forum.owncloud.org/viewtopic.php?f=23&t=10281#p25879
If you’re running Plesk also have a look at this hint: https://forum.owncloud.org/viewtopic.php?f=23&t=9145&p=22662#p22662
When running Apache with mod_fcgid (like used often at e.g. shared hosters) please note there is a long outstanding bug in Apache described here: https://forum.owncloud.org/viewtopic.php?f=29&t=23312#p107526
maximum allowed upload size is configured correctly.
In case you’re getting the error message “Request Entity too large”, check if any of this applies:
If you’re running Lighttpd on Linux and the permissions of your tmp directory (e.g. /var/tmp) don’t permit the server to write there, uploads over a certain small size (somewhere between 4KB and 100KB) will fail with a “413 Request entity too large” error.
Services like Cloudflare might also cause issues with larger uploads.
There are also some reports about problems with large files in PHP:
Progress for uploads > 2GB breaks (32bit issue?) ( https://bugs.php.net/bug.php?id=59918 )
http upload max_limits and file above 2GB ( https://bugs.php.net/bug.php?id=44522 )
Important hint: Please check your PHP installation with OC Tools provided here: https://forum.owncloud.org/viewtopic.php?f=8&t=2921 for the capability to upload large files.
If you have fiddled around with the session_lifetime setting in the ownCloud config, make sure you have not set it to a too low value. Otherwise this can also cause timeouts / upload issues with larger files within the browser.
NginX Users should also check the client_max_body_size config option which is set to 10G when using the recommended NginX Config: http://doc.owncloud.org/server/5.0/admin_manual/installation/installation_others.html
You’re running a 64bit version of PHP which has 64-bit integer or large file support. If you’re a windows user you have to wait until this is fixed:
The maximum allowed upload size is determined as the minimum of these values:
- php configuration entry “post_max_size”
- php configuration entry “upload_max_filesize”
- The free space left on the target device
- The post_max_size and upload_max_filesize in your php.ini gets overwritten by the .htaccess file shipped with ownCloud when AllowOverride is set to All. If you’re using the default .htaccess file shipped by OC you will see an upload limit of 513MB.
- If your upload_tmp_dir directive of your php.ini is located on a different partition also make sure that this folder has enough space for uploading large files.
For the php values, you should make sure the values you are setting are actually considered (see “How to check your PHP version and configuration”; when calling the info.php file in the browser, you should see the configuration values from above on the output, with the values as php is using them at the moment. If they don’t reflect what you have set, one of the most common problems is that you didn’t restart the server after changing them.
Another probably cause on apache servers if you set the values via .htaccess would be that the “AllowOverride” directive in your virtual host is set to “None”, and therefore no .htaccess settings are considered; change it to “All”.
Setting the maximum upload size in the Webinterface
In most installations, there is a maximum upload size to be configured in the “Admin” section as administrative user called “File handling”. This sets the two above php settings in the .htaccess file. If you don’t see this option, your .htaccess is not writable, or it isn’t effective!
Users running NginX, lighttpd or other webservers not using .htaccess files won’t see the gui too.
Note for windows/IIS users: You should take a good look at this tutorial: https://forum.owncloud.org/viewtopic.php?f=8&t=2370 (especially the “Request Filtering” section)
Note for really big files (>2GB): If your upload fails with a message like “Upload exceeds your max_upload_limit”, you might consider updating your php to a newer version. For me, this problem occured with files > 2GB with php version 5.3.10, but was solved with version 5.4.13.
Bugreport at the php bugtracker for this issue: https://bugs.php.net/bug.php?id=60205