1

Im confused... I can't seem to upload files in the 2gb range. When i try using curl to send a 1.92gb file to my site (through an API), it doesn't report anything at all, its just blank. When i send a 1kb file, it reports back like it should.

When i try uploading via the upload form, it ends up freezing mid way, around 33%. Although im not sure if only the progress bar has froze or if the actual file upload it self has been suspended. I suspect that only the progress bar has froze because it still says data is being sent even though the progress bar freezes.

My php.ini (yes, its reflected by phpinfo as well):

register_globals = Off
magic_quotes_gpc = Off
post_max_size = 2047M
upload_max_filesize = 2047M
max_execution_time = 25200     ; Maximum execution time of each script, in seconds
max_input_time = 25200  ; Maximum amount of time each script may spend parsing request data
memory_limit = 2048M      ; Maximum amount of memory a script may consume (16MB)
short_open_tag = On 

My vps doesnt actually have 2gb of ram at its disposal, but does memory_limit really need to be set this high?

How should i go about testing this? I know 400mb files work, i haven't tested anything in between 400mb and 1.92gb

You will need a premium account to test up to 2gb, so here is one you can play with:

User: testreferral

Pass: 1234

http://filefx.com

I dont understand where this problem is arising.

jiexi
  • 3,019
  • 7
  • 26
  • 28
  • This could be a problem of the underlying filesystem. Search around on SO, I'm pretty sure it's been discussed a number of times – Pekka Nov 02 '10 at 23:51
  • any keywords i should include in the search? – jiexi Nov 02 '10 at 23:52
  • http://linuxmafia.com/faq/VALinux-kb/2gb-filesize-limit.html for a non-SO link on the subject – Mark Baker Nov 02 '10 at 23:59
  • im pretty certain it isnt a filesystem problem since i can create 2gb+ zip files no problem – jiexi Nov 03 '10 at 00:10
  • There's nothing obviously wrong. Check if you have anything in your error log or php error log. – Artefacto Nov 03 '10 at 00:16
  • interestingly enough, I can upload 600mb files, API reports back with a download page, BUT the file doesn't actually show up in the uploads folder – jiexi Nov 03 '10 at 00:30
  • You might try upping the max upload to ~2.25GB, and then see if it works then. You can always check to see that it was below 2GB in the validation code, and also on the client side with javascript (to prevent them from sending it if it won't work...just don't rely on it). – Thomas Nov 03 '10 at 00:57
  • I just tested with a 1.90 GB file and it uploaded completely fine http://filefx.com/files/GsXG1288753040.html (I generated that by dd'ing from /dev/zero, so it is all zeros). – Thomas Nov 03 '10 at 03:02

2 Answers2

0

Check for:

  1. Memory limit. Try uploading files above and below the actual memory limit.
  2. Time limit. Aren't your uploads take 7+ hours, are they?
  3. The effective settings. Some setting might be overridden by server/etc settings.
Halil Özgür
  • 15,731
  • 6
  • 49
  • 56
0

PHP: mysql query skipped/ignored after large file uploads?

Mysql was timing out during the file upload. So the file wasn't showing up in the DB

Community
  • 1
  • 1
jiexi
  • 3,019
  • 7
  • 26
  • 28