"The selected file ... could not be copied." Error.
| Project: | Imagefield Gallery |
| Version: | 5.x-1.4 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | EclipseGc |
| Status: | active |
Jump to:
Hi,
Great module - I look forward to its further development.
I've been playing with it recently to see what it can do, and it works just dandy, apart from a niggling error message that I get (on my system).
I initially installed both ImageField Gallery and ImageField Gallery Lightbox2, added one Imagefield on a node type (and set to multiple values), and then saved the config screens for the modules.
I then received the error message thus:
"The selected file /mypath/mypath/mypath/mypath/httpdocs/files/tmp/filexxxxxx could not be copied."
I initially thought file permissions with ImageCache or something, but noticed that the ImageField Gallery and ImageField Gallery Lightbox2 modules were working as they should.
To investigate, I disabled both modules and no errors appeared.
I then just enabled ImageField Gallery (no lightbox) and the above error message appeared again.
I disabled both modules as I thought it may be some other problem somewhere, so I uploaded some images to some nodes and Imagecache works just fine.
The strange thing is that when ImageField Gallery is enabled the warnings appear on all pages, not just the node types that has the CCK field in them.
At this point, I thought I'd suppress the warnings via admin, and look at it later. But when I set errors to only be written to logs the warnings still appear.
There's no major hurry, but could anyone advise me on how I diagnose this further?
- Notes
Image.module is disabled, and only one Image field is on the node.
- Versions
ImageField Gallery 5.x-1.4
ImageField 5.x-1.2-rc1
jQuery Update 5.x-2.0
ImageCache 5.x-1.6
ImageField Gallery Lightbox2 5.x-1.4
Thanks.
D.

#1
this IS a permissions issue (at least if it's what I think it is). Manually delete the gallery.css file in files/imagefield_gallery and go save one of the style admin screens again. Should fix you.
Eclipse
#2
Hi Eclipse.
Many thanks for your reply, I really appreciate it.
Interestingly there was no gallery.css in the files/imagefield_gallery to delete.
I checked the perms - files and imagefield_gallery are both 777
"style admin screens" - do you mean the theme admin, or something else?
(anyways, I went and saved the theme admin screens and the imagefield_gallery configs etc. etc., but still no gallery.css)
Thanks,
D.
#3
I've never had any problems that even resemble this... Did you alter the tmp directory of your main drupal settings? If you're running this locally, I would imagine that the tmp directory is actually in localhost/tmp or something... it shouldn't be part of your drupal install, it's directly related to apache.
Eclipse
#4
Hi,
Again, thanks for your response. ;-)
My settings for the File system are:
files
files/tmp
(the Drupal defaults)
and the Download method is set to Public.
In addition, I do not run this locally, the install is on its own unix server.
After going through the logs, I of course find that there are the entries for:
page not found - files/imagefield_gallery/gallery.css
but also, I am getting this rather strange error:
user warning: Got a packet bigger than 'max_allowed_packet' bytes query: UPDATE cache_views SET data = 'a:4:{s:6:\"tables\";a:49:{s:12:\"baj_usernode\";a:2:{s:4:\"name\";s:8:\"usernode\";s:4:\"join\";a:3:{s:4:\"left\";a:2:{s:5:\"table\";s:4:\"node\";s:5:\"field\";s:3:\"nid\";}s:5:\"right\";a:1:{s:5:\"field\";s:3:\"nid\";}s:4:\"type\";s:5:\"inner\";}}s:13:\"baj_buddylist\";a:2:{s:4:\"name\";s:9:\"buddylist\";s:4:\"join\";a:3:{s:4:\"left\";a:2:{s:5:\"table\";s:12:\"baj_usernode\";s:5:\"field\";s:3:\"uid\";}s:5:\"right\";a:1:{s:5:\"field\";s:3:\"uid\";}s:4:\"type\";s:5:\"inner\";}}s:9:\"baj_users\";a:3:{s:4:\"name\";s:5:\"users\";s:4:\"join\";a:3:{s:4:\"left\";a:2:{s:5:\" in /mypath/mypath/mypath/mypath/mypath/mypath/database.mysql.inc on line 172
I'll look into this and update you shortly.
Thanks again,
D.
#5
Sorry, bit of a red herring there - this was to do with my default mysql configuration.
Updating to max_allowed_packet=32M solved this.
#6
so... solved? I'm marking closed unless you say otherwise.
#7
OK, not "files/tmp" just "/tmp"
try it again and let me know.
#8
Hi,
Thanks for the reply.
In the File System config, I changed thus:
File system path: files
Temporary directory: tmp (I had to create this as it didn't already exist).
Both were chmod 777.
Upon enabling ImageField Gallery 5.x-1.4, I still received the error:
"The selected file /mypath/mypath/mypath/mypath/mypath/tmp/file9ByjPa could not be copied."
I did try to change both file config settings to include the '/' e.g. '/files' and '/tmp' but I could not get this to work - no matter what I tried I always got the
" * The directory /files does not exist.
* The directory /tmp does not exist."
error when saving the settings.
I've not yet encountered this with other modules that I currently have installed, so I'm not sure that is a problem with my set-up generally - though of course, I could be wrong. ;-)
Maybe the module is conflicting with another? - I'm no expert though.
Thanks again, I appreciate your help on this.
D.
#9
OK, let's back up.
Are you using an apache box? what's the OS?
Nothing should be "conflicting". The module is pretty well self contained, so I'd be incredibly surprised if there's anything of that sort going on, especially since this isn't javascript related.
Other modules don't generally create their own files or file structures, even views and cck don't do this and they're amongst the most complex modules drupal has. You HAVE to have access to the tmp location on your server, usually this isn't a problem for most folks. You're the first person to complain about this.
Eclipse
#10
Apache Box -yes.
OS - RedHat EL4
#11
Hi,
i had the same problem and fixed it for me 5 min. ago.
So here we go:
I deleted the files/imagefield_gallery folder because i could not give it CHMOD 777 (it always droped back to 775), after creating it on my own i could give it CHMOD 777 and voila i also had the gallery.css in it after that and no more errors!
hope it will help to fix it for you too.
croX
#12
Hi croX,
Excellent. You are a hero - I was going crazy with this. ;-)
One thing I had to do after manually creating the folder was to re-save the config screens - but after that - perfect.
Many thanks.
One thing that slightly concerns me (maybe) is the rights issue of 777 - is this a security risk at all?
Cheers!
D.
#13
Honestly I'm the wrong person to ask, my understanding was that this was especially risky outside of /files. I'm hoping to drupal-tough-love the module after the 2.0 final is out. We'll see what gets said then.
I'm marking this as closed since everyone seems happy.
Eclipse
PS: Thx Crox
#14
Hello,
sorry for re-opening, but I'm having the same error and this solution unfortunately didn't helped me. I deleted the imagefield-gallery folder (I have folder changed for every node type to name "gallery" and "products" so I deleted those folders), created new, changed the permissions and re-saved configs on file system and node types - and I still getting this error.
I have SSH access (using WinSCP client) to my web server so I have no problem with setting permission.
Any thoughts?