Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following code:


<form action="upload_file.php" method="post"
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<input type="submit" name="submit" value="Submit">

if ($_FILES["file"]["error"] > 0)
  echo "Error: " . $_FILES["file"]["error"] . "<br>";
  echo "Upload: " . $_FILES["file"]["name"] . "<br>";
  echo "Type: " . $_FILES["file"]["type"] . "<br>";
  echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
  echo "Stored in: " . $_FILES["file"]["tmp_name"];

When I upload I just eventually get a The connection was reset page

  • I have nginx as a frontend and php-fpm as the backend
  • php settings are set very high so no limits.

What should I try to debug this? I don't have anything in the error_log for PHP.

share|improve this question
Have you checked your webserver or php-fpm error logs, there's a chance there's something there. – Drew Khoury Aug 21 '13 at 7:33
up vote 0 down vote accepted

First set


Review your error handling settings in php.ini and make sure that errors are not logged but displayed.

If that doesn't not help look into nging's error_log to see what if the reset comes from the server-process for some other reason.

share|improve this answer

First step is to upload a plain html file and ensure you can view that. I presume that is working so your webserver is there, you have the right dir, server etc. Second step would be to create a very simple PHP page showing the phpinfo. I know this is a silly question but did you name the file with a php extension?

share|improve this answer
Yes, html works. Yes, php works and yes it does. – Frank Thornton Aug 20 '13 at 10:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.