2

I'm trying to upload files over 150MB with a PHP file, which works without any problem with files less than 40Mb. But when I try to upload files like 150 to 200 MB, it resets the upload process after uploading about half of the file. It repeats again and again when the new upload process gets to same value, till the time limits on php.ini file kills the process.

The first thing I tried was increasing those values in my php.ini file:

post_max_size=450M
memory_limit=300M
max_execution_time=1600
max_input_time=1600
upload_max_filesize=400M

and file_uploads is of course set to On. I also put this line to top of my upload.php file:

set_time_limit(0);

I'm running that website on Windows Server 2008 R2 with Parallels Plesk 12.0.8.

I search this problem on Google too much but none of the solutions work on my case. I read the same scenario in this question, which the owner of the question replied that he solved the problem by increasing client_max_body_size value in nginx.conf file, but I could not find anything about this file in Windows server so I thought it is only exists on Linux systems.

What could cause this problem?

Community
  • 1
  • 1
F.E.A
  • 307
  • 1
  • 12
  • 2
    After changing this setting did you restart your server? that's necessary to get changes reflected – Alive to die - Anant Jun 21 '16 at 12:54
  • 2
    Are you using a CDN and/or does your server provider have any limits? – Bri Jun 21 '16 at 12:55
  • Anant, I restarted and I can see those values changed by calling phpinfo() Brian G, I'm not using a CDN and I don't think I have any limits more than I can interfere. I'm using a VPS server by the way. – F.E.A Jun 21 '16 at 13:12

1 Answers1

1

I've solved it.

I changed PHP's debugger from FastCGI Application to CGI Application on Plesk, and that solved it.

But be careful, it caused me a couple of errors in other pages of the website, and I've fixed them all again.

Hope that helps.

F.E.A
  • 307
  • 1
  • 12