# \[Q\] php upload NOT working?

**URL:** <https://forum.kirupa.com/t/q-php-upload-not-working/239550>\
**Category:** Uncategorized\
**Created:** [September 23, 2007, 8:48am UTC](https://forum.kirupa.com/t/q-php-upload-not-working/239550 "2007-09-23T08:48:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![manfree](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@manfree](https://forum.kirupa.com/u/manfree)\
**Post date:** [September 23, 2007, 8:48am UTC](https://forum.kirupa.com/t/q-php-upload-not-working/239550/1 "2007-09-23T08:48:05Z")

</div>

Dear all,  
I have grabbed a PHP upload source from web, however some poblem occur  
[LIST]  
[_]The destinated directory has been granted for the READ/WRITE premission  
to EVERYONE, IUSR\_MACHINE, IWAN\_MACHINE  
[_]computer Management \> Internet Information Services \> web sites \> default Web site \> MySite \> Uploads \> Properties \> directorythe box of “Write” is checked[/LIST]The file is uploaded correctly to the PHP temporary directory,  
Because i can see that there is a file comes up when a large file is being uploaded and disapear after the upload completed

However, it seems cannot move the file from temporary directory to the destinated folder successfully.

[COLOR=darkorange]It just prints out “There was an error uploading the file, please try again!”[/COLOR]  
[COLOR=darkorange]and [/COLOR]

[COLOR=darkorange]"Array ( [uploadedfile] =\> Array ( [name] =\> a.avi [type] =\> [tmp\_name] =\> [error] =\> 2 [size] =\> 0 ) ) "[/COLOR]

Any people can help ??

Thanks

```auto
<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>

```

```php
 
<?php 
$target_path = "uploads/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']); 
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
} else{
    echo "There was an error uploading the file, please try again!";
}
print_r($_FILES);
?>

```
