1
votes

My server settings are as below:

  • max_execution_time : 0
  • max_input_time : -1
  • memory_limit : 128M
  • upload_max_filesize : 128M
  • post_max_size : 128M

still I am getting ERR_CONNECTION_RESET while uploading a file (size > 8MBs). Not even var_dump($_FILES); is working. Any file size below 8MBs is uploading easily. Not sure where I am wrong. Please suggest.

Although all the server configurations are set still I am getting the same issue.

4
Possible duplicate of Can't upload files bigger than 8MBS.I.
What web server are you using? For Apache 2.0, check out @S.I.'s comment, for NGINX, you might need to edit the client_max_body_size in your nginx.conf.Magnus Eriksson
Where can I edit this? I have cpanel detail and ftp detail. This is a shared hosting.Mona
Server Apache is 2.4.23Mona

4 Answers

1
votes

Check your php settings for both of these:

upload_max_filesize = 64M
post_max_size = 64M
0
votes

The problem in my case is the file I was trying to upload. That PDF file was corrupted. I repaired the PDF file with some online PDF file repairing tool and it worked fine.

0
votes

In case if you have shared server, you can add php.ini file and add following lines to it.

memory_limit = 1024M
max_input_vars = 2000
upload_max_filesize = 300M
post_max_size = 300M
max_execution_time = 990

This will work fine.

0
votes

In additional to the above, make sure that

LimitRequestBody

in your .htaccess file is set properly or disabled altogether. 0 means unlimited

Docs here

Apache LimitRequestBody Directive