I am having file upload issues. So far, I have not been able to upload any files. My server has a Windows 7 32 bit OS. I am running PHP 5.2.17 and Apache 2.2.
This is my index.php page:
<html>
<head>
<title>Upload file</title>
</head>
<body>
<form enctype="multipart/form-data" action="upload.php" method="POST">
<input type="file" name="pix">
<input type="submit" name="Upload" value="Upload a file">
</form>
</body>
</html>
And, this is the upload.php page that handles file uploads:
<?php
$_FILES['pix']['name'];
move_uploaded_file($_FILES['pix']['tmp_name'], "c:\data");
if (move_uploaded_file($_FILES['pix']['tmp_name'], "c:\data"))
{print "Received {$_FILES['pix']['name']}";}
else
{print "Upload failed!";}
?>
Every time I attempt to upload a file, the move_uploaded_file command returns false, which throws the string "Upload failed!". I don't see any errors in the Apache or PHP logs. The directory "c:\data" does exist. The file I am attempting to upload is only 500 Kilobytes, and is within the configuration limits in Apache and PHP. Below, I have attached a .ZIP containing my php.ini and http.conf configuration files.
Does anyone have any idea why it returns false? Thanks in advance.