Jump to content

File upload problem


evanmcd
 Share

Recommended Posts

Hi,

For the first time, I'm having trouble with the file uploader when uploading large files on our staging server.

I've got this in the main .htaccess

php_value upload_max_filesize 301M
php_value post_max_size 301M

But, when I upload a file of about 17MB or so, the progress bar stops at anywhere between 96 and 99%.

Guessing it's the ajax uploader, but not sure if there's a way to disable it or workaround it.

Thanks.

Link to comment
Share on other sites

Is there some specific file size where this fails? I am thinking about possibility to automatically fallback to traditional upload when files are 15MB or larger. Although we need to first try to find the reason and fix for this.

Link to comment
Share on other sites

  • 8 months later...

Hi everyone,

I face same problem with file upload. The ajax processed small file without a problem (around 3MB), but when it is time for large files (greater than 6MB) it stalls at 99%. FF console outputs error 'JSON.parse: unexpected character'.

My share hosting limits at Hostgator

safe mode = Off (cannot adjust)

memory_limit = 256M (MAXIMUM)

max_execution_time = 30 (MAXIMUM in seconds)

max_input_time = 60 (MAXIMUM in seconds)

post_max_size = 64M (MAXIMUM)

upload_max_filesize = 64M (MAXIMUM)

enable_dl = Off (cannot adjust)

File is below 64MB limit. What could it be?

Link to comment
Share on other sites

I'm not sure what it could be, but I think it would be worth trying another browser just in case it's client side. Since you are using FF, try it in Chrome just to see if it makes any difference. What is the exact size of the file you are uploading? I can try to find something similar here to test with.

Link to comment
Share on other sites

Result of 50MB file upload via InputfieldFile

---------Firefox upload test-----------------------------------------------------------

Progress bar stalls at 99%

---------Console output-----------

[22:28:41.797] SyntaxError: JSON.parse: unexpected character @ .../wire/modules/Jquery/JqueryCore/JqueryCore.js?v=162:16

----------PHP error log----------

[00:28:41] PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 50000001 bytes) in Unknown on line 0

[00:30:10] PHP Warning: Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/pws/:/home/pws/store/openssl/) in Unknown on line 0

[00:30:10] PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0

---------Chrome upload test------------------------------------------------------------

Progress bar stalls at 100%

---------Console output-----------

Failed to load resource: the server responded with a status of 404 (Page Not Found)

Uncaught SyntaxError: Unexpected token < JqueryCore.js:16

e.extend.parseJSON JqueryCore.js:16

$.parent.each.fileData InputfieldFile.js:171

----------PHP error log----------

[01:15:41] PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 50000001 bytes) in Unknown on line 0

--------IE upload test------------------------------------------------------------

Upload doesn't begin; Ajax doesn't function.

  • Like 1
Link to comment
Share on other sites

I've set memory_limit same as post_max_size and upload_max_filesize to recreate the case on test server. In conclusion, memory_limit is the cause of upload failure. Memory_limit should be increased to accommodate upload and other functions. It is why small files upload just fine, but large files not. Problem solved. :)

  • Like 2
Link to comment
Share on other sites

  • 5 years later...

We have the same issue with files larger than 250MB, our limits are 1Gigabytes on upload_max_filesize and post_max_size only memory_limit is 256M:

Screen_Shot_2018-04-08_at_22_28_05.thumb.png.3dfc64c9f139c350f0936001700434f0.png

Could something like this solve the problem for the future?

https://stackoverflow.com/questions/5249279/file-get-contents-php-fatal-error-allowed-memory-exhausted?answertab=votes#tab-top

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...