Pre V3.4 - Debug large uploads failing and 'error: true'

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
*******************************************************
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
  • 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
 

ysmods

New Member
Jan 29, 2013
860
1
0
UK
www.ysmods.com
Re: Debug large uploads failing and 'error: true' problems.

Also if you do use a 64bit system and want to upload files larger than 2GB and your server runs WHM/cPanel, the maximum /tmp folder size is 4GB, its hard coded into the file /scripts/securetmp.
 

ipland

New Member
YetiShare User
Apr 21, 2013
5
0
0
www.ipland.in
Re: Debug large uploads failing and 'error: true' problems.

Excelent info!!!!!! I correct some mistake on my config so now i cant upload big file without problems!!! :)
 

ysmods

New Member
Jan 29, 2013
860
1
0
UK
www.ysmods.com
Re: Debug large uploads failing and 'error: true' problems.

Ran into this problem on a customers server today.

If you are running Plesk 11 and are having problems uploading files over 16MB then the fix is below.

Open the file in an ssh terminal:

Code:
/usr/local/psa/admin/conf/templates/default/domain/domainVirtualHost.php
Edit line 126:

Code:
FcgidMaxRequestLen 16777216
Changing it to

Code:
FcgidMaxRequestLen 2147483648
Save the file then run this command:

Code:
/usr/local/psa/admin/sbin/httpdmng --reconfigure-all
I don't know why Plesk decided to hard code that limit, but it caused a lot of head banging against a wall last night.
 

halalrizik2841

New Member
YetiShare User
Aug 5, 2013
40
0
0
Re: Debug large uploads failing and 'error: true' problems.

Hi,

I am having problem with the script (Sorry to post here as i can't see any post new thread button), script keeps logging out all my users and the admin as well. This mostly happens with firefox. How do i fix this?
 

halalrizik2841

New Member
YetiShare User
Aug 5, 2013
40
0
0
Re: Debug large uploads failing and 'error: true' problems.

Another problem has started now. I have uploaded larger files of 1.5 GB and cannot play them : example http://www.fileloby.com/437acef028da12df.

When i started the upload, i was logged in, but by the time upload was finished i was logged out and the file was showing on the server.
 

admin2102

New Member
YetiShare User
Jan 15, 2013
85
0
0
Re: Debug large uploads failing and 'error: true' problems.

Question I have just started to have this problem but any file larger than 2mb Fails I have made sure the php.ini both values are set upload_max_filesize = 2G, post_max_size = 2G when I go into admin panel I get a message.
ERROR:
The maxium permitted upload size in your php.ini file (2 MB) is less than what you've configured for the free account level (500 MB) and paid account level (2 GB). Uploads greater than 2 MB will not work on the site.

Please contact your host to have the PHP max upload size increased.

Any clue? My server runs WHM/cPanel I have also made sure my tmp folder is correct. I have had no probs till now with this.
 

admin2102

New Member
YetiShare User
Jan 15, 2013
85
0
0
Re: Debug large uploads failing and 'error: true' problems.

Nevermind for some reason my server is messed up its showing max is 2m but the ini file is showing 2g must have messed up when we moved.
 

ollie

Member
YetiShare User
Apr 25, 2013
75
5
8
United Kingdom
Re: Debug large uploads failing and 'error: true' problems.

Been through everying, even changed to plesk and still get Error: File returned zero size with anything over 2GB :(
 

ugur2949

New Member
YetiShare User
Aug 30, 2013
55
0
0
33
Turkey
www.sistemduragi.com
Hello,

I tried to modify / etc / httpd / conf.d / fcgid.conf by adding

FcgidMaxRequestLen 2147483648

and

/ usr / local / psa / admin / conf / templates / default / domains / domainvirtualhost.php

but does not upload 100mb+

Help please
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
ugur2949 said:
Hello,

I tried to modify / etc / httpd / conf.d / fcgid.conf by adding

FcgidMaxRequestLen 2147483648

and

/ usr / local / psa / admin / conf / templates / default / domains / domainvirtualhost.php

but does not upload 100mb+

Help please
What's your tmp folder size?
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Looks fine. Do you have a local php.ini file in the root of the script?
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Sometimes local php.ini files cause issues or reset global config values even when not defined in the file. Are you able to test without it? i.e. rename it to something else so it's disabled.
 

ugur2949

New Member
YetiShare User
Aug 30, 2013
55
0
0
33
Turkey
www.sistemduragi.com
I changed files name " sitename.com/httpdocs/php.ini " to /phps.ini

but same
downlium.com 150mb + files size...


"If you make money or for free.
I would like to convey to you the access information"

Thanks
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Sure, send me your access details via the contact form above and I'll take a look. Can you include FTP and script admin access.
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Use the contact form:

http://www.mfscripts.com/contact.html