PHP上传服务器重置错误

This is my script. If i try to upload a image which is just 100kb am getting connection reset error.

<?php
$target_dir = "uploadtest/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
// Check if image file is a actual image or fake image
if(isset($_POST["submit"])) {
    $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);
    move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file);
}
?>
<!DOCTYPE html>
<html>
<body>
<form action="" method="post" enctype="multipart/form-data">
    Select image to upload:
    <input type="file" name="fileToUpload" id="fileToUpload">
    <input type="submit" value="Upload Image" name="submit">
</form>
</body>
</html>

I have changed upload_max_filesize,post_max_size,max_input_time,memory_limit and LimitRequestBody. Nothing helps.

  • upload_max_filesize: 240M
  • memory_limit: 2000M
  • post_max_size:128M
  • max_input_time: 300000
  • LimitRequestBody 102400

enter image description here

What might be the issue?