Hi there

Have created a number of Drupal sites using this great module but now just getting this error message when I try to upload an image. The strange thing is that the site works on my localhost version, but not when I upload to the server:
....................................

* warning: move_uploaded_file(c:\windows\temp/Picture2.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /mnt/web1/41/20/52019720/htdocs/sandpit2/includes/file.inc on line 572.
* warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/mnt/shared/tmp/phpxCaaGL' to 'c:\windows\temp/Picture2.jpg' in /mnt/web1/41/20/52019720/htdocs/sandpit2/includes/file.inc on line 572.
* File upload error. Could not move uploaded file.
* The selected file /mnt/web1/41/20/52019720/htdocs/sandpit2 could not be copied.
................

... not sure what is gong on. Any help would be appreciated.

Files: 
CommentFileSizeAuthor
#22 file.inc_.zip20.96 KBckrina
#19 file_upload.JPG43.8 KBrajaboys
Image1.jpg108.13 KBmcjudd

Comments

Title:Unable to Upload imageUnable to Upload image - warning: move_uploaded_file(c:\.......) [function.move-uploaded-file]: failed to open

Any help on tis one would be appreciated

Simply unable to upload a simple image

Status:Active» Fixed

I'm pretty sure that this bug is already fixed in the latest development snapshot.

Status:Fixed» Closed (fixed)

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

(deleted)

hey please help me on this....getting the same error...plz help me asap....

well i got its solution...but a new problem arises........
if i have uploaded one image once and after deleting that picture to put some other pic ...i m always geting the same pic...
plz help me out

you are sure that there remains enough place on your hosting / hard drive ?

Am having same problem as original post stated. And I have plenty of space available. Any help would be appreciated.

What about to post the solution ?

Component:image.module» image_import
Assigned:Unassigned» honorfield
Status:Closed (fixed)» Active

Hey there!

I've got the same problem. I can't upload pictures to the remote server through Drupal. First i got an error massage saying that the php safe mode is holding Drupal back from connecting to the files folder to safe the image. So i switched off the safe mode and created the files folder new to get sure that the writing permission is on. Now i'm getting this massage:

warning: move_uploaded_file(sites/default/files/tmp/8lions_04.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /var/www/vhosts/8lions.com.au/httpdocs/includes/file.inc on line 579.
warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/php9uiMwA' to 'sites/default/files/tmp/8lions_04.jpg' in /var/www/vhosts/8lions.com.au/httpdocs/includes/file.inc on line 579.
File upload error. Could not move uploaded file.
The settings have not been saved because of the errors.

I don't know anymore what to do! Please help!

honorfield

Status:Active» Closed (fixed)

Hey there!

I found a easy solution that worked for me. I created the folder "tmp" in "sites/default/files" with full read/write permission (777).
Now i'm able to upload images:)))) Maybe it works the same on a local windows server like the one above. That would mean you have to create a "temp" folder in "c:windows\".

Regards

honorfield

more than likely eveyone who is having a problem here has been developing on their local computer, then are tryng to migrate their system to a remote server. When you do this, you are probably moving your setting for directory paths along as well.

For example the temp path for your images is probably different than the image temp path on your host system.

I recommend this test in Drupal 6.14.
goto /admin/settings/file-system

and look at your temporary directory... if its glaring red, then try renaming it to something like: /tmp.
if that does not work, try renaming to just tmp ( no forward slash)

Next step to test this will be to upload an image or file. I tested it by uploading a new logo.
But remember, that if you do a FULL DB dump from phpmyadmin from your local computer to the new host, you will probably see this problem again.

goto /admin/settings/file-system

and look at your temporary directory... if its glaring red, then try renaming it to something like: /tmp.
if that does not work, try renaming to just tmp ( no forward slash)

That solved my problem, thank you

Thanks! this helped a lot...
Just also figured that it takes the WEB path when you say 'tmp' (not the system path). If tmp doesn't help, somewhere in the 'sites/default/files' works!
Nevertheless, the reason why it doesn't work for '/tmp' is a mystery. Maybe it tries to write to the system's '\tmp'

Thanks a Lot Its working perfectly (#12,#13)

Thanks a lot!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Everything started working.

So simple and I'd never figure it out by myself. Thanks dude =D

Thanks! Solved my problem as well.

Title:Unable to Upload image - warning: move_uploaded_file(c:\.......) [function.move-uploaded-file]: failed to open * warning: move_uploaded_file() [function.move-uploaded-file]: Unable to access \xampp\tmp/file_name.jpg in /var/www
StatusFileSize
new43.8 KB

HI ,

i was try the above settings in admin/settings/file-system, but still i am unable to upload images, still shows error msg in admin/settings/file-system - The directory does not exist.i was created directory and give write permission for particular folder, kindly help me to solve this issue

Priority:Normal» Critical
Status:Closed (fixed)» Active

Hello,
I have found the solution to this problem
Solution:your directory of upload is not exactly written as it is located.
kindly check it..

Category:support» bug
Status:Closed (fixed)» Active
StatusFileSize
new20.96 KB

Hi, I fixed it in other way.
In fact, I created the "tmp" directory with correct permissions, but it didn't fixed it.
Finally I founded somewhere that it could be a problem with the file.inc archive. Now, I can't remember what was the trouble (I haven't enaougt knowledge from developing) but I attach here the file that I uses in all new installs.

I'm sorry for not to be able to say what is exactly the problem, but maybe somene can use it.

Don't forget to save a security version of the older file.

Edit: As #25 says, no change core if you can found any other solution and use this only as a last resort. With new Drupal releases I never get this error again.

The above answer/file solved this problem for me... thanks soo much, was searching for some time!
K

Help me a lot.. thanks for this..keep rocking...

Category:bug» support
Status:Active» Fixed

The answers in 12/13/14 are the correct one.

Please do NOT hack core as comment 22 suggests!

Status:Fixed» Closed (fixed)

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

hello i have the same issue here
The directory /tmp does not exist.
i create new file tmp in sites/default/files and give it right permission
but i am still have the same problem !!

what should i do !!!

Category:bug» support
Status:Active» Closed (fixed)

Give the proper temp folder path in filesystem settings. Check your reports page for more details.

Done :)

Thankssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

I change the filename from Chinese characters to English characters. Then the problem solved.

Thanks for your valuable answer.