I have the simplest code possible to upload a file using php and it only doesnt work using mozilla firefox.
The server responds: 'Bad Request Your browser sent a request that this server could not understand.'

This is the code(2 files):
upload_file0.php

<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>

upload_file.php

<?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"];
  }
?>

Any answer will be truly appreciated.
Thanks

Clear all cookies in browser and then check.

Thanks vibhaj,

I already done that and it didnt work.

I have something to say that might be important:
when i upload on firefox small files of a few kb's it works, the upload works.
But when i use files a little bigger like 800 kb i have the same problem.
The problem is that with firefox the uploads are slower, and im guessing that the server must have a timeout
for uploading files. How do i get this timeout disabled i just dont know.

Any clues ??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.