Closed (fixed)
Project:
Image
Version:
5.x-1.x-dev
Component:
image.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Jan 2007 at 20:50 UTC
Updated:
13 Apr 2007 at 16:46 UTC
Hello,
When I create an image node, I get an error message :
The removal of the original file C:\WINDOWS\TEMP\tmp798.tmp has failed.
The selected file D:\Inetpub\wwwroot\MySiteFolder\files could not be copied.
There are no images attached to the post.
Permissions are OK.
I have tried tips from http://drupal.org/node/84405
I have read that there were problems with image module and PHP 5.2. Is this the case with version 5.x ?
Thank you.
Comments
Comment #1
Joe One commentedI have exactly the same problem.
I get the error message "C:\WINDOWS\TEMP\tmp838.tmp" could not be copied.
But then I also see "The Image has been edited" confirmation.
Is there some way of finding out why the file could not be copied?
Comment #2
drewish commentedmy guess would be that your webserver is limiting the uploaded files to a certain file size. you should try uploading a smaller file.
the audio module displays a the maximum upload size next to the browse button using code like
t('The current PHP configuration limits file uploads to %maxsize.', array('%maxsize' => format_size(file_upload_max_size())));Comment #3
AstaC commentedI have two testsites on the same server. In one of them I get exactly this problem, on the other it works fine. Haven't got a clue why. But it has nothing to do with size.
Comment #4
drewish commentedwhat do you have set as the image modules' files directory? on both sites?
Comment #5
AstaC commentedimages. Which is the same as files/images. It looks exactly the same on both sites.
Comment #6
drewish commentedi've run into problems with simply using 'images' i've had to use 'files/images'
Comment #7
flebas commentedI think the problem may be related with Drupal's temporary files directory settings.
If I enter an absolute path, file upload works. I have not yet tested with images.
Comment #8
Joe One commentedTried about everything mentioned. Still isn't working.
I think the problem can be found in file.inc, where there is a function called 'file_copy'.
The error warning ('The selected file C:\WINDOWS\TEMP\tmpC56.tmp could not be copied to files/ikke.jpg.') is generated in this function on line 377. I've added the $dest to provide some more information.
Strange thing is that when i upload an image, the resize function returns an "everything ok" message.
Could the problem be related to the "copy" PHP function?
Comment #9
sfa commentedI'm having the same problem, I've tried everything suggested and just cannot get it to work.
Comment #10
sfa commentedHad a last go at this and finally managed to get it to work. It seems to be a problem with the permissions on the temporary file. By default the temp file seems to be "c:\windows\temp". I created a temp file in the druipal installation, went to Administer > siteconfiguration > File System and changed the "Temporary Directory" to the new folder. It's now all working fine.
Hope this helps!
Comment #11
Joe One commentedHi sfa,
what exactly did you enter in this field?
On this screen there is a warning at the field with the "files" location that if you change this while this is already used, this will generated problems. What kind of problems can i suspect? The one that i'm experiencing now on two different webservers, one windows IIS 6, the other one an Apache server...
I'm getting a bit desperate here...
Comment #12
flebas commentedYou must enter an absolute path for Drupal temporary files directory (e.g. d:\inetpub\wwwroot\drupal\files\temp).
You must also set permissions of the internet server user (IUSR_server for IIS) to read, write, delete for this directory.
Comment #13
drewish commentedComment #14
(not verified) commented