I will copy the problem and solution in full, for the benefit of simplicity: this is also posted in the forums. this is the first significant bug in an opensource project that i've run over and then found the solution for independently, so i'm sorta happy about it:
forum here: http://drupal.org/node/84405
(september 15) when I first set up Drupal and the image module it worked really well. I was able to upload without a problem. However, I have been adding modules and fiddling around, and now it doesn't work. When I submit an image node, it churns away for a bit and then pops back an error saying
"The selected file /hermes/web05/b650/pow.hongpong/drupal-test/htdocs/files could not be copied.". Oddly, it creates a zero-length file named either 'file', 'file_1' file_2 etc in the proper ultimate image destination folder each time i try, sequentially. i've tried clearing these but they come back.
At the moment I have these modules active:
aggregator, blog, collapsiblock, comment, devel, devel_node_access, embedfilter, help, image, image_attach, image_gallery, img_assist, jstools, menu, page, panels, path, poll, profile, service_links, statistics, story, tagadelic, taxonomy, throttle, upload, video, video_customfields, video_image, video_multidownload, video_optmetadata, video_params, video_upload, views, views_theme_wizard, and views_ui .
I have hosting on PowWeb (shared box), and I suspect this might be a problem with permissions, but I made sure that /files has 777 and /files/images, /files/images/temp as well. I thought maybe there was some htaccess URL rewrite glitch since I activated that (with standard file) after I got image upload working, but i can't find anything related to that in htaccess. Possibly i should try changing the group owner to the web server, but 777 ought not to make that a problem. It is running on a subdomain.
SOLUTION: (october 3)
Funny thing is that I got a message on this this morning, and i only fixed it last night at 1:30 am! So last night i got it working, after quitting working on the problem for weeks. I decided to blitz the situation and switch my production site to Drupal (http://www.hongpong.com/ ), in the hopes that it was some anomalous permission error that might be limited to my hosting company's weirdness. (and a fresh file install might duck the problem)
however i was quite sad after i put fresh copies into my main directory, created new 'files' and images folders with 775 and 777 permissions (tried both for each) and same damn error happened.
i also had the minimal set of modules - far fewer than my previous setup above, which meant it was less likely to be a simple module conflict.
then i took a hunch (like Orson Welles in 'touch of evil', i go on intuition) changed a couple settings in the 'content type' controls under 'settings', here:
admin/settings/content-types/image
I disabled "attach images" and "attachments" for image nodes and saved configuration.
then i went back to the 'create image node' page. interestingly, the actual 'browse to image' box on the form actually moved around (from *above* the category box to *Below* it) - and i sensed i might have nailed it. so i uploaded that remarkable image of the Coup in front of the exploding world trade center - and it worked! here:
http://www.hongpong.com/node/789
so i think the lesson is that image nodes should not have more attachable images and/or attachments. i may have made other changes that fixed it, but i'm pretty sure this is what did it.
(note: i am experimenting now to see which one it is - and it appears that *only* allowing images causes the image-browse box to move around - and therein probably lies the problem)
my regards to all the developers - thanks for all the grunt work guys!
Comments
Comment #1
tom friedhof commentedThanks for documenting your work around. The same exact thing happened to me in Drupal 5 RC2. I disabled image attach and attachments in the image content type and that fixed the problem.
Comment #2
drewish commentedmarked http://drupal.org/node/116826 as a duplicate of this.
Comment #3
drewish commented(whoops didn't mean to change the version)
also marked http://drupal.org/node/112001 as a duplicate of this
Comment #4
drewish commentedComment #5
(not verified) commented