File upload temp file not created!
Posted: Thu Oct 19, 2006 11:12 am
This problem has been driving me nuts seeing as how I could not find other people that have had this problem. I am just trying to get file upload working but it seems like nothing is happening from the server end. Tmp files should be deleted right after the request is made but there is nothing in $FILES. I am running Apache 2.2.0 and PHP 5.1.2 on FC 5. My tmp upload directory has apache as owner and I get no errors through php or apache. Apache was on debug error mode and php was on all errors. My code is below:
Thanks for any help!
Code: Select all
<h2>Upload Image</h2>
<p>
<?
if (isset($_POST['name'])) {
$tmp = $_FILES['image']['tmp_name'];
echo $tmp.'<br />';
}
?>
<form enctype="multipart/form-data" action="./?site=pictures" method="post" >
<input type="hidden" name="MAX_FILE_SIZE" value="1000000"/>
<table>
<tr>
<td>Your Name: </td>
<td><input name="name"/></td>
</tr>
<tr>
<td>A Comment: </td>
<td><input name="comment"/></td>
</tr>
<tr>
<td>Upload File: </td>
<td><input type="file" name="image" /></td>
</tr>
<tr>
<td><input type="submit" value="Upload"/></td>
</tr>
</table>
</form>
</p>