The code isn't anything too fancy.
$makedir = mkdir($savedir, 0777);
$savedir is in the form of /full/path/to/new/directory
$movethis = move_uploaded_file($tmp_name,$newdestination);
At this point, I am 100% certain this problem has to do with apache being the owner of the file.