move_uploaded_file not working in ubuntu 10.04
<p>hey guys, am having a bit of a problem here, move_uploaded_file is not actually working at all, and its showing some warnings in my terminal. </p>

<p>my code:</p>

<pre>

$name =  $_FILES['file']['name'];
$size =  $_FILES['file']['size'];
$type =  $_FILES['file']['type'];
$error =  $_FILES['file']['error'];
$temp =  $_FILES['file']['tmp_name'];
$destination = "uploads/";

if($size > 10000000) {
    exit("file size is too big, Max allowed size is 10Mbs");
}

if($type == "application/x-ms-dos-executable") {
    exit("not allowed file formatt.");
}

move_uploaded_file($temp, $destination.$name);
</pre>

<p>terminal:</p>

<pre>
[Sat May 14 15:14:01 2011] [error] [client ::1] PHP Warning:  move_uploaded_file(uploads/gears_16.png): failed to open stream: Permission denied in /var/www/alex/fileupload/upload.php on line 18, referer: http://localhost/alex/fileupload/
[Sat May 14 15:14:01 2011] [error] [client ::1] PHP Warning:  move_uploaded_file(): Unable to move '/tmp/phpMxKzds' to 'uploads/gears_16.png' in /var/www/alex/fileupload/upload.php on line 18, referer: http://localhost/alex/fileupload/


</pre>

<p>and files wont move, the source, destination and file permissions are 777.
this is getting frustrating :(</p>
