2

I am trying to upload a 12 GB file through file upload but the post data is empty

It work for 8GB file but failing for larger than that

My php.ini values are

max_execution_time 30000000000
max_input_time 60000000000
memory_limit 6G
post_max_size 800G
upload_max_filesize 200G

Please Help! thanks in advance

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
Dinesh Singh
  • 104
  • 8
  • What errors did you get when you checked your error log? – Sherif Sep 20 '16 at 18:57
  • There is no error for apache error log file i checked that but no luck. – Dinesh Singh Sep 20 '16 at 18:58
  • What errors did you get when you checked your ***PHP error log***? Where's the code you used that led you to the conclusion that "*post Data is empty*"? – Sherif Sep 20 '16 at 18:59
  • 1
    There is a limit for post uri string http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers – Farhan Sep 20 '16 at 18:59
  • There was no error at the end of post if ( !empty($_SERVER['CONTENT_LENGTH']) && empty($_FILES) && empty($_POST) ) echo 'The uploaded zip was too large. You must upload a file smaller than ' . ini_get("upload_max_filesize"); i had checked by this code that the post is empty – Dinesh Singh Sep 20 '16 at 19:01
  • Try increasing `memory_limit` to larger than the max file size i.e. `memory_limit 13G` – RiggsFolly Sep 20 '16 at 19:07
  • @RiggsFolly OK I changed it trying upload now hold! New values are memory_limit 20G post_max_size 18G upload_max_filesize 16G – Dinesh Singh Sep 20 '16 at 19:09
  • Its still not working does anyone know why is it not working? – Dinesh Singh Sep 20 '16 at 20:16

2 Answers2

0

If the upload_max_filesize is larger than post_max_size, you must increase post_max_size so that it is bigger than upload_max_size.

If the value of post_max_size is larger than memory_limit, you must increase > memory_limit so that it is larger than post_max_size.

Therefore try to increase memory_limit or decrease post_max_size.

This article explains in details

EDIT

I've encountered a similar problem today: when I attempt to upload large files, no response returns. Error log showed the following:

[Wed Nov 02 07:45:28.428652 2016] [fcgid:warn] [pid 15602] [client 213.24.127.118:22388] mod_fcgid: HTTP request length 139264 (so far) exceeds MaxRequestLen (131072), referer: https://domain.com/path

Such problem is solved by setting FcgidMaxRequestLen in vhosts file to whatever value is fine for you.

Georgy Ivanov
  • 1,573
  • 1
  • 17
  • 24
  • So this means that if i want to upload a 12GB file than my memory limit should be arround 20GB and post max size should be arrounf 18 GB ? – Dinesh Singh Sep 20 '16 at 19:02
  • OK I changed it trying upload now hold! New values are memory_limit 20G post_max_size 18G upload_max_filesize 16G – Dinesh Singh Sep 20 '16 at 19:07
  • Were you successful with this? I'm finding a long delay after the upload has reached 100% (a few minutes) before the file becomes available as completed.. – BSUK Apr 01 '17 at 00:55
0

set max_execution_time to (0) zero. Zero means the script can run forever. Next set max_input_time to (-1). This specified that -1 is unlimited because no script can be executed with a negative time.

Example

max_execution_time = 0
max_input_time = -1

You must set the value of memory_limit larger than post_max_size and upload_max_filesize. In your case, set the value like bellow.

memory_limit = 20G
post_max_size = 15G
upload_max_filesize = 15G

Then of course restart apache server or restart all services