2

I have checked all of the threads, none of them seem to match this issue.

I am using Google Chrome to upload, which has no trouble uploading files of 4GB+

Server is Apache 2.2.15 with PHP 5.3.3 Filesystem is ext4, i have a swapfile that is 2.5GB so I know the filesystem isn't the problem.

PHP.ini settings:

max_execution_time = 7200
max_input_time = 7200
upload_max_filesize = 5000M
post_max_size = 5000M  
memory_limit = 2750M

when upload_max_filesize was 3G it had identical behavior. Also had identical behavior when I left post_max_size at 8M The memory doesn't even use up the entire 700MB of HW ram, let alone touch the swap, so i know it's not memory.

It only takes about 10 minutes or so to upload the entire 2.5GB file, however everytime it gets to 83% the file just dissapears.

I watch it with du /tmp and it goes up to 2.0GB, and is always 'disappeared' before it gets to 2.1GB

Filesystem is ext4, i have a swapfile that is 2.5GB so I know the filesystem isn't the problem.

It's always at the same place that it happens. There is no error in error_log, nothing displayed, it just deletes the temp file, and when the script tries to do stuff to it, there is nothing in the $file['tmp_name'] which makes sense because it deleted the file.

Running RHEL 6.4 on Amazon AWS

Any ideas?

  • Do you have a htaccess or httpd.conf?Add these `php_value upload_max_filesize 5000M` `php_value post_max_size 5000M` – Mihai Mar 14 '14 at 20:34
  • no difference. it seems to failing at the size of of a 32 bin integer. odd because phpinfo() reports the correct setting size. i'm going to try a compile from source, god this is going to suck – user3421418 Mar 14 '14 at 20:49
  • Maybe amazon has an overriding setting for uploads.(wild guess) The largest object that can be uploaded in a single PUT is 5 gigabytes not sure how this differs from post..weird – Mihai Mar 14 '14 at 20:51
  • I'm sure it's the 32bit int limit, that's where it dies everytime. even though `PHP_INT_MAX` is 9223372036854775807 so i can't figure why PHP would break at the 32bit int limit. it's a 64 bit os if that was unclear – user3421418 Mar 14 '14 at 20:57
  • Splitting is not an option? – Mihai Mar 14 '14 at 20:58
  • Nope it's for an end user to use who needs a webinterface to point and click to this file for upload on a biweekly basis – user3421418 Mar 14 '14 at 21:10
  • Okay so I upgraded to 5.5, and then with a value of 5GB, it wouldn't even start writing the file. I believe the version of 5.3 i had was properly parsing 5GB, however I think the code handling the upload err'd out at the 32bit integer limit.. in this version of 5.5, when i put in 5GB, the file would not even start to be written. I believe it saw the content-length header and figured 'hey that's more than i can handle' and just didnt try. so i set the limit to 0, and now it works! thank you ! too bad i just installed the development tools for nothing -.- – user3421418 Mar 14 '14 at 21:58
  • http://httpd.apache.org/docs/current/mod/core.html#limitrequestbody Apache might be the game breaker, also ready this post: http://stackoverflow.com/questions/4614147/uploading-a-file-larger-than-2gb-using-php – Lexib0y Mar 16 '14 at 10:14

1 Answers1

0

Try maybe to set a value to post_max_size that is larger than the value of upload_max_filesize.

plop
  • 1
  • 1