-1

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);

}
Tim Baker
  • 35
  • 1
  • 7

1 Answers1

0

In the end, I was logged into a cloned server and the directories I was referencing didn't actually exist on the server I was referencing. Thanks for attempted help.

Tim Baker
  • 35
  • 1
  • 7