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.
Comment | File | Size | Author |
---|---|---|---|
#22 | file.inc_.zip | 20.96 KB | ckrina |
#19 | file_upload.JPG | 43.8 KB | rajaboys |
Image1.jpg | 108.13 KB | mcjudd |
Comments
Comment #1
mcjudd CreditAttribution: mcjudd commentedAny help on tis one would be appreciated
Simply unable to upload a simple image
Comment #2
sunI'm pretty sure that this bug is already fixed in the latest development snapshot.
Comment #4
aangel CreditAttribution: aangel commented(deleted)
Comment #5
itzsudip CreditAttribution: itzsudip commentedhey please help me on this....getting the same error...plz help me asap....
Comment #6
itzsudip CreditAttribution: itzsudip commentedwell 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
Comment #7
c-gundo CreditAttribution: c-gundo commentedyou are sure that there remains enough place on your hosting / hard drive ?
Comment #8
erynsidhe CreditAttribution: erynsidhe commentedAm having same problem as original post stated. And I have plenty of space available. Any help would be appreciated.
Comment #9
ronline CreditAttribution: ronline commentedWhat about to post the solution ?
Comment #10
honorfield CreditAttribution: honorfield commentedHey 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
Comment #11
honorfield CreditAttribution: honorfield commentedHey 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
Comment #12
IrishGringo CreditAttribution: IrishGringo commentedmore 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.
Comment #13
benway CreditAttribution: benway commentedThat solved my problem, thank you
Comment #14
gunith CreditAttribution: gunith commentedThanks! 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'
Comment #15
preethivv CreditAttribution: preethivv commentedThanks a Lot Its working perfectly (#12,#13)
Comment #16
ashish.mehta113 CreditAttribution: ashish.mehta113 commentedThanks a lot!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Everything started working.
Comment #17
eforth CreditAttribution: eforth commentedSo simple and I'd never figure it out by myself. Thanks dude =D
Comment #18
venkatd CreditAttribution: venkatd commentedThanks! Solved my problem as well.
Comment #19
rajaboys CreditAttribution: rajaboys commentedHI ,
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
Comment #20
rajaboys CreditAttribution: rajaboys commentedComment #21
drupalkumar CreditAttribution: drupalkumar commentedHello,
I have found the solution to this problem
Solution:your directory of upload is not exactly written as it is located.
kindly check it..
Comment #22
ckrinaHi, 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.
Comment #23
suninthecorner CreditAttribution: suninthecorner commentedThe above answer/file solved this problem for me... thanks soo much, was searching for some time!
K
Comment #24
Ravi Shankar Karnati CreditAttribution: Ravi Shankar Karnati commentedHelp me a lot.. thanks for this..keep rocking...
Comment #25
joachim CreditAttribution: joachim commentedThe answers in 12/13/14 are the correct one.
Please do NOT hack core as comment 22 suggests!
Comment #27
beto_beto CreditAttribution: beto_beto commentedhello 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 !!!
Comment #28
preethivv CreditAttribution: preethivv commentedGive the proper temp folder path in filesystem settings. Check your reports page for more details.
Comment #29
beto_beto CreditAttribution: beto_beto commentedDone :)
Comment #30
kyo620724 CreditAttribution: kyo620724 commentedThankssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
Comment #31
fishfree CreditAttribution: fishfree commentedI change the filename from Chinese characters to English characters. Then the problem solved.
Comment #32
vijithpangath CreditAttribution: vijithpangath commentedThanks for your valuable answer.
Comment #33
g one CreditAttribution: g one commentedthis solution is working for me
please create tmp floder in your project floder like project/tmp then it's work