# PHP: move\_uploaded\_file error

**URL:** <https://forum.kirupa.com/t/php-move-uploaded-file-error/298883>\
**Category:** programming\
**Created:** [October 26, 2009, 7:02pm UTC](https://forum.kirupa.com/t/php-move-uploaded-file-error/298883 "2009-10-26T19:02:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![speedy\_rudolf](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@speedy\_rudolf](https://forum.kirupa.com/u/speedy_rudolf)\
**Post date:** [October 26, 2009, 7:02pm UTC](https://forum.kirupa.com/t/php-move-uploaded-file-error/298883/1 "2009-10-26T19:02:50Z")

</div>

Hi. I have the following code:

```auto
$timp=time();
$file_dir="./upload".$timp;
mkdir($file_dir, 0777);
foreach($_FILES as $fisier=>$fisiere)
 {if(is_uploaded_file($fisiere['tmp_name']))
  {move_uploaded_file($fisiere['tmp_name'], "$file_dir/$fisiere[name]");}}

```

Well…that is just part of the code…Anyway…After I use the form, I get the following error:

> **Warning** : move\_uploaded\_file() [[[COLOR=#0066cc]function.move-uploaded-file[/COLOR]](http://rudolf.uv.ro/php/function.move-uploaded-file)]: SAFE MODE Restriction in effect. The script whose uid/gid is 189252/189236 is not allowed to access /home/www/free/uv.ro/rudolf.uv.ro/php/upload1256583575 owned by uid/gid 81/81 in **/home/www/free/uv.ro/rudolf.uv.ro/php/upload.php** on line **9**

Does anyone know what the problem is? Thanks you.

PS: line 9 is the last line of code I copied, and I’m using post to submit the form.
