Project:Backup and Migrate
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:critical
Assigned:Gutte
Status:closed (fixed)

Issue Summary

Hi, I'm getting this error when I attempt a restore:

"warning: move_uploaded_file(tmp/jbilling-2009-06-05T10-24-56.sql) [function.move-uploaded-file]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/jbilling-new/includes/file.inc on line 572.
warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/Applications/MAMP/tmp/php/phpFUKgwU' to 'tmp/jbilling-2009-06-05T10-24-56.sql' in /Applications/MAMP/htdocs/jbilling-new/includes/file.inc on line 572.
File upload error. Could not move uploaded file."

This happens with 1.2 as well. My tmp directory seems fine. Do you have a suggestion?

-Andre'

Comments

#1

Status:active» closed (fixed)

Please reopen if this is still an issue.

#2

I have the same problem with 6.17 - have moved my website from my host to localhost - and im getting the same error:

# warning: move_uploaded_file(/home/virtual/_tmp/flower_blue.ico) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\AppServ\www\BlomsterPartiet\includes\file.inc on line 603.
# warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\Windows\Temp\php85D.tmp' to '/home/virtual/_tmp/flower_blue.ico' in C:\AppServ\www\BlomsterPartiet\includes\file.inc on line 603.

Looks like all other things are working - i getting this error when trying to upload logo or favicon :(

Dearly Regards Gutte

#3

Priority:normal» critical
Assigned to:Anonymous» Gutte
Status:closed (fixed)» active

Sorry forgot to set it active.

#4

Status:active» fixed

Sounds like a problem with your file system setup rather than with backup and migrate if it's happening when you try to upload a favicon. Check that your files and temp directories are set to existing directories and that the web server can write to those directories.

#5

Thx :)

#6

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#7

Hello i am trying to restore a database and i am running into the same problems. I have copied my /sites folder over and i am still recieving this message-

warning: move_uploaded_file(/Applications/MAMP/tmp/php/mysiter-2010-10-19T09-37-29.mysql) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/pubtokco/public_html/mysite/includes/file.inc on line 615.
warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpxLa4Xf' to '/Applications/MAMP/tmp/php/mysite-2010-10-19T09-37-29.mysql' in /home/pubtokco/public_html/mysite/includes/file.inc on line 615.
File upload error. Could not move uploaded file.

I have been trying for hours to sort it out but i am getting nowhere fast. Ive tried changing permissions the lot. Does anyone have any ideas of what i could try next?

thanks

#8

    // Move uploaded files from PHP's upload_tmp_dir to Drupal's temporary directory.
    // This overcomes open_basedir restrictions for future file operations.
    $file->filepath = $file->destination;
    if (!move_uploaded_file($_FILES['files']['tmp_name'][$source], $file->filepath)) {
      form_set_error($source, t('File upload error. Could not move uploaded file.'));
      watchdog('file', 'Upload error. Could not move uploaded file %file to destination %destination.', array('%file' => $file->filename, '%destination' => $file->filepath));
      return 0;

line 615 being-

  if (!move_uploaded_file($_FILES['files']['tmp_name'][$source], $file->filepath)) {

thats just all beyond me. It's a bugger.

#9

sorted:) It was my Site config>file system Temporary directory: that needed changing to /tmp

#10

Thank You! kompressaur.

this was my warning as I was trying to add a picture to my profile:
warning: move_uploaded_file(/Applications/acquia-drupal/tmp/php/me_cu.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /Users/cale/Sites/acquia-drupal/includes/file.inc on line 618.

Resolved my problem. go to site configuration > File System and look at Temporary directory:
"/Applications/acquia-drupal/tmp/php

in my case, I had to add my tmp folder and php folder inside. Simple fix. Thanks