In an attempt to try and identify the issue, I have tested a very simple upload script as follows consisting of 2 files.
[myUploader.htm]
<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"];
if (file_exists("uploads/" . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"uploads/" . $_FILES["file"]["name"]);
echo "Stored in: " . "uploads/" . $_FILES["file"]["name"];
}
}
?>
This worked fine and uploaded the file titled "candles.jpg" to the "uploads" directory and displayed the following trace data
Upload: candles.jpg
Type: image/jpeg
Size: 264.78515625 Kb
Stored in: /tmp/php0vEAJlStored in: uploads/candles.jpg
One other thing to note which may or may not be relevant. I am testing on a server that is Load Balanced Shared Web Hosting.