I have a feeling the answer to this question is really obvious but I can't seem to find an answer.
After moving my Drupal installation from my personal computer (running XAMPP) to a shared server everything works great except I get the following error when trying to upload an image:
* warning: move_uploaded_file(C:\xampp\tmp/test.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/mywebsite/public_html/includes/file.inc on line 572.
* warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpX8DJbU' to 'C:\xampp\tmp/test.jpg' in /home/mywebsite/public_html/includes/file.inc on line 572.
* File upload error. Could not move uploaded file.
Looks like I just need to update the directory it's using to temporarily store the uploads? Can't figure out where this directory is stored....
I really appreciate any help. Thanks.
Comments
Permissions
I could be wrong, but check your permissions on your tmp directory to see if it can be written to. I had all sorts of weird errors once and I did that and it fixed it. I don't know if thats your problem, but it can't hurt.
Don't I have to change the
Don't I have to change the directory "C:\xampp\tmp" to a working temp dir on the server? That directory is what it was using when it was installed on my computer. I'm just not sure how to go about changing it.
I have the exact same problem
It looks like Drupal is picking up the image from a tmp folder and trying to write it to a folder on c:
Surely it should be trying to write it to a folder on the server, no?
_
drupal will write files wherever you've told it to at: admin/settings/file-system. Do you have drive c in the file system path setting?
Video Issues
I have a content type that includes both an audio and video file. I was running into this error issue so I changed my /tmp files to /sites/all/tmp and the audio now uploads perfectly. However, the video is going the same thing, and even gives me the error that it can't move the file from the /tmp directory.
Is there some setting that would prompt one kind of file to keep trying to upload to one place, while other files go somewhere else?
I fixed this problem
I was having the same problem originally described and i fixed it by changing the Temporary directory location over at site configuration > file system.
good luck ya'll