0

newcomer here! -:) I have a task about enhancing a file-sharing service and we need to support file uploads larger than 2GB over simple HTTP. We are running IIS 10 / FastCGI / PHP 7.2.7 64bit on a Server 2016 Standard. So far I tried the following settings without any success:

post_max_size: 3G (php.ini)
upload_max_file: 3G (php.ini)
max_input_time: 120 (php.ini)
max_execution_time: 120 (php.ini)
maxAllowedContentLength: 4294967295 (IIS)

It's a basic multipart/form-data POST request. Attempting to upload a file larger than 2GB results in "UPLOAD_ERR_PARTIAL" in the $_FILES array. I can see the file being created in PHP's temp folder (C:\PHP\tmp in our case) during the upload operation, but just before it reaches 2GB of size the file disappears from the temp folder.

PS: I also tried the same on latest Xampp (Apache) and surprisingly it worked just fine.

Do you think I'm missing something on the IIS side? Or maybe FastCGI? We're trying to keep this as simple as possible and for the time being splitting up the file into some smaller chunks (or switching to FTP/SFTP) is not an option. I know HTTP is not really meant for stuff like this, but we are on a tight schedule already.

Best regards, Katherine I.

  • you need to take a look at the apache limitations https://stackoverflow.com/questions/4614147/uploading-a-file-larger-than-2gb-using-php – unixmiah Aug 22 '18 at 14:33
  • @unixmiah Thanks for your time! Our goal is to get this working on IIS. The code already runs properly on Apache – Katherine93 Aug 23 '18 at 06:26

0 Answers0