2

There are similar questions on this site but both seem to be Windows related. This is Ubuntu 12.04.

On EE 2.5.1, I have two upload directories configured:

$config['upload_preferences'] =
  array(
   1 => array(                                     
    'name'        => 'Article Images',            
    'server_path' => '/var/www/myhost/files/article_images/', 
    'url'         => 'http://myhost/files/article_images/',  
    'properties'  => 'style="border: 0;" alt="image"'
   ),
   2 => array(                                     
    'name'        => 'Image of the Week',            
    'server_path' => '/var/www/myhost/files/image_of_week/', 
    'url'         => 'http://myhost/files/image_of_week/',  
    'properties'  => 'style="border: 0; width:160px;" alt="image"'
   )
  )

I can upload images to directory 2 but when I upload to directory 1 I get the message, "Thumbnail could not be created for the image. Please make sure the thumbnail directory is writable".

For starters, the directories are identical:

[myuser@ubuntu:/var/www/myhost/files]$ ll article_images/
total 20012
drwxrwxrwx 4 myuser mygroup      12288 Mar 26 10:12 ./
drwxrwxrwx 6 myuser mygroup       4096 Mar 25 23:33 ../
... more files
drwxrwxrwx 2 myuser mygroup   20480 Mar 21 14:26 _thumbs/

and

[myuser@ubuntu:/var/www/myhost/files]$ ll image_of_week/
total 340
drwxrwxrwx 3 myuser mygroup   4096 Mar 26 10:19 ./
drwxrwxrwx 6 myuser mygroup   4096 Mar 25 23:33 ../
... more files
drwxrwxrwx 2 myuser mygroup   4096 Mar 26 10:19 _thumbs/

Details are obfuscated but I can assure you user/group ownership is identical and in any case all permissions are set to 777.

I've tested with the same jpeg image, it uploads fine in "image of week" but fails in "article images".

I have tested the EE server wizard and all requirements show Supported: yes.

php.ini shows memory_limit = 128M.

I believe I've dealt with every suggestion offered on the other similar questions on this site. What am I missing? Something obviously wrong in my file upload preferences?

4
  • 1
    Strange. Have you tried uploading an image of thumbnail size to see if that works? That should, in theory, be uploaded OK and then we know it's just something to do with the thumbnail creation side of things. Also, are you able to synchronise upload directories without any problems?
    – Ian Young
    Mar 26, 2013 at 12:37
  • I spotted a _preview directory in the article images folder... changing permissions on it has fixed the problem. Is this directory used for image manipulations? I was tipped off by your suggestion to synchronise, the non-working directory had image manipulations, while the working directory did not. If you want to type this up as an answer ("this error can also be related to image manipulations, check permissions on the _preview folder") I'll mark it correct. Mar 26, 2013 at 20:15
  • You should be able to type out an answer to your own question and mark it as solved.
    – kmgdev
    Mar 29, 2013 at 22:30
  • I know that, but I wanted to give credit to Ian. Mar 31, 2013 at 6:32

1 Answer 1

1

Also, are you able to synchronise upload directories without any problems?

This error can also be related to image manipulations, check permissions on the _preview folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.