I randomly started having difficulty moving an uploaded file to another folder. Have checked permissions of videos folder, and have made sure it's writable. I'm using full paths, and haven't had issues with this previously. Any thoughts?
Warning: move_uploaded_file(): Unable to move '/tmp/php5xBeV5' to '/home/main/homes/videos/1440597514_tmp_IMG_20150804_174422551.jpg' in /home/main/public_html/app/classes/video.class.php on line 34
function importVideo() {
$filename = $_FILES["file"]["name"];
$newfilename = substr(md5(rand()), 0, 7);
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$target_file = '/home/main/homes/videos/'.$filename;
$file = $_FILES['file'];
move_uploaded_file($file['tmp_name'], $target_file);
}