Closed (duplicate)
Project:
Image
Version:
4.7.x-1.x-dev
Component:
image_attach
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
23 Jan 2007 at 13:21 UTC
Updated:
26 Feb 2007 at 06:53 UTC
Hello!
I got error "The selected file /var/www/drupal/files could not be copied." When trying to upload image files to dupal. Image file if png. Ie checked file permissions and paths several times and there is no problem with those. File copy operation is from /tmp/ to Drupal file folder but all I see there is pile of empty files (size 0) named named like: files, files_0,files_1 etc. Is this configuration problem or actual bug?
Rest of the system is here:
Drupal 5.0
PHP Version 5.1.2
Ubuntu 6.06 LTS
Comments
Comment #1
trenchard commentedI get the same problem with JPG files.
Error: The selected file /home//public_html/files could not be copied.
All file and user limits are well above what I need to upload basic images.
Comment #2
peter chen commentedSame here, I installed the most recent release of image (20th Jan 07) in the hope of dealing with the thumbnail image and since then have the same problem.
I can ftp and http files onto the server with other methods (e.g. SCP and upload/attach) but image module won't create the files at all giving the error.
Config:
Configuration file Protected
Cron maintenance tasks Last run 22 min 46 sec ago
You can run cron manually.
Database schema Up to date
File system Writable (public download method)
MySQL database 4.1.16
PHP 4.3.11
Unicode library PHP Mbstring Extension
Web server Apache/1.3.33 (Unix) PHP/4.3.11 mod_perl/1.29
Modules installed are:
Blog
Comment
Contact
Menu
Path
Search
Statistics
Upload
Image
Image Attach
Image Gallery
Mime Mail
Send
Countdown Timer
Poormans Cron
TinyMCE
Webform
Hope this helps!
Comment #3
Stefan Nagtegaal commentedI have exactly the same problem here...
Still trying to figure out what is going on, though no clue yet..
image.module or image_attach.module is pretty borked atm...
Comment #4
Stefan Nagtegaal commentedPeter chen: Try disabling all your contrib modules, and only enable image/image_attch..
See what happens then...
Are you sure GD 2 is installed on your server?
Comment #5
Stefan Nagtegaal commentedSetting priority to reflect the status of the module for usage...
Comment #6
peter chen commentedStefan, thanks for that: yes, I turned them off to see if that was the issue and double checked GD2, here's the report (drupal also reports it in working order):
gd
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with TTF library
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
Comment #7
Stefan Nagtegaal commentedTry disabling every contrib module except the image.module (thus, also DISABLE image_attach and image_gallery) and now try uploading an image through image.module..
Does it work now?
My guess is there is something terrible wrong in image_attach...
Comment #8
peter chen commentedYou're brilliant. I only had to diable image attach and it works again - disabling the other contribs was not required. There's the problem, and the temporary work around for others.
Thanks for your advice on this one,
P
Comment #9
walkah commentedOK guys, thanks for narrowing it to image_attach. I will have a look this evening and see if i can't get things straightened out.
Comment #10
toste commentedSame problem altho a little different, i can't upload image unless i disable image_attch. But i need image attach on other modules i created to attach image to it. The weird thing is it was working till we got plenty of image, then suddently it wasn't.
I reinstalled the module, downloaded the latest version, still not working... HELP !
Comment #11
doerings_net commentedHi,
Similar issue under 5.x: In my case the error message was related to the image.module; more specifically in a scenario using image and i18n together.
From 5.x onwards, i18n uses file revisions for attachements.
If you created a translated node (from an existing image node), the image.module would think it had to create a new file whereas intention was to use an existing one (just with another revision).
I added therefore in _image_insert of image.module at the beginning:
function _image_insert($node, $label, $image) {
// If i18n was originator via translation, i18n will care; no updates are necessary
if ($image == basename($image)) {
return;
}
More ideas/presumptions can be found here:
http://drupal.org/node/122506
Comment #12
drewish commentedsee http://drupal.org/node/87453