*******************************************************
IMPORTANT:
This thread applies to v3.3 and before of YetiShare. As of v3.4 the script uses 'chunked' uploads which will avoid any of these issues.
*******************************************************
Use this page to debug failing larger uploads, the "error: true" message or the homepage refreshing when you upload a file.
Some useful links regarding Apache, max uploads etc:
IMPORTANT:
This thread applies to v3.3 and before of YetiShare. As of v3.4 the script uses 'chunked' uploads which will avoid any of these issues.
*******************************************************
Use this page to debug failing larger uploads, the "error: true" message or the homepage refreshing when you upload a file.
- Make sure permissions are set to writeable on the /files/ folder (CHMOD 755 or 777 depending on your server setup).
- Make sure the url you're using to access the site is exactly the same as the one you've set in _config.inc.php. Due to the way ajax works, if you've set www.domain.com and try to upload on domain.com (without www) it won't work. You can force all traffic via the non-www version by commenting out the relevant lines in the .htaccess file.
- PHP Settings:
- Modify your php.ini settings (usually located in /etc/php5/php.ini) to the following:
- upload_max_filesize = 2G
- post_max_size = 2G
- max_execution_time = 84600
- max_input_nesting_level = 84600
- max_input_time = 84600
- NOTE: Ensure you restart your webserver after making changes. "post_max_size" and "upload_max_filesize" cannot exceed 2G on 32 bit systems.
- NOTE ALSO: For GB (gigabyte) settings, don't use the characters GB, it may fail. Just use G. i.e. 2G
- Modify your php.ini settings (usually located in /etc/php5/php.ini) to the following:
- TMP Folder Size:
- Ensure you have plenty of space in your server tmp folder for large files. When your web server uploads a file, it sends it to the tmp folder during the upload process, before PHP can do anything with it. If you have limited space in your tmp folder, large uploads will fail. There should be at least 20GB free in this folder for larger uploads. Check it by using our test script - http://www.mfscripts.com/check_host.zip
- Apache FastCGI Users/Plesk (mod_fcgid), edit 'fcgid.conf':
- Make sure 'FcgidMaxRequestLen' is greater than your permitted max file size. i.e. 2147483648 = 2GB.
- Set 'FcgidConnectTimeout' to allow for long uploads. 28800 = 8 hours.
- FcgidBusyTimeout 18000 // Allow up to 5hours download/streaming before the process will be iddle and killed by default it was 300 (seconds)
- FcgidIOTimeout 600
- Plesk Users: See here for info on how to modify FastCGI limits: http://stuffthatspins.com/2013/01/22/exceeds-maxrequestlen-16777216-plesk-mod_fcgid-unable-to-upload-large-files/comment-page-1/#comment-21155
- Suhosin Users:
- Within the servers php.ini file set 'suhosin.post.max_value_length' to a large value. i.e. 2147483648 = 2GB.
- Red Hat E5 Servers:
- Increase 'LimitRequestBody' within '/etc/httpd/conf.d/php.conf'. This is set to a low value by default, it sets the amount of bytes from 0 (for unlimited) to 2147483647 (2GB) which are permitted in a request body.
Some useful links regarding Apache, max uploads etc:
- http://apacheweb.blogspot.co.uk/2012/03/php-handler.html
- https://www.dokuwiki.org/faq:uploadsize