Monday, 19 August 2013

PHP Upload File leads to blank page

PHP Upload File leads to blank page

I have the following code:
<html>
<body>
<form action="upload_file.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
<?php
if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "<br>";
}
else
{
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.

No comments:

Post a Comment