I have a feeling this is my fault, but despite reading through previous issues and following as closely as possible I don't seem to be able to make it work. The issue looks vert similar to the multisite one, but I'm not using multisite so making a new one.
I'm using imagecache, imagefield, cck and contemplate. All are the latest CVS tarballs from yesterday. I've got images uploading into a cck nodetype using imagefield, and am setting up teasers with contemplate for now. When I first upload an image using imagefield I don't see it properly, but after submitting the node it displays fine.
I've set up a ruleset called newsthumb - crops to 80x100, and another called test which scales to 80x100 in case it was an issue with cropping.
Have tried several combinations of delete, update, flush for the ruleset and the action (and the image) but no result.
The problem I'm getting is that even using the full imagecache url I'm unable to display the thumb - I get a bit of space which quickly disappears.
When I try to flush the ruleset I get this error intermittently - not all the time. but either way there's no imagecache directory being made in /files:
* Flush Ruleset: 4
* rulesetdir: files/imagecache/newsthumb/files
* warning: opendir(files/imagecache/newsthumb/files) [function.opendir]: failed to open dir: No such file or directory in /home/mysite/public_html/modules/contrib/imagecache/imagecache.module on line 357.
* warning: readdir(): supplied argument is not a valid Directory resource in /home/mysite/public_html/modules/contrib/imagecache/imagecache.module on line 358.
user/group ownership of the files folder is set to www-data, and it's chmod 0777. From reading the other issues I understand this error is normal if no thumbnail has been made yet, but I don't seem to be able to make the thumbnail by viewing the image in the first place to find out if it works later.
If I create the directory structure manually (i.e. files/imagecache/[ruleset/files) that makes no difference, although I don't get the opendir error I still don't see a thumbnail and the [ruleset]/files directory is empty.
Trying to view a thumbnail with contemplate and filepath examples posted on the multisite thread produces exactly the same results.
I'm running apahe2, php5, mysql5 and have the php5-gd extension installed. No multisite or anything like that, clean urls are on and working.
I've tried everything I can think of, but this is all quite to me so that isn't saying much!
Any help much appreciated, this combination of modules looks like it'll be amazing if I can get it working...
Comments
Comment #1
stanbroughl commentedi think i'm having similar problems generating images using image cache - have a look at this post http://drupal.org/node/78579 - dopry is having a look at it at the moment and is going to get back to me with a solution or proper way of calling the function
Comment #2
catchthanks, I'll keep an eye on that issue, looks like some progress!
Comment #3
dopry commented@catch,
the open_basedir is a php security issue your systems administrator has to locked into a file tree and you are passing a path that is outside of that file tree... If you can resolve that, imagecache will likely work for you.
Comment #4
catchThanks dopry.
I followed your instructions on the bug report that stanborough linked to and did this to .htaccess
#SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options +FollowSymlinks
#
#RewriteEngine off
#
and that fixed it. I've now got resizing working, (but incidentally couldn't get crop to do anything) with only that change. As I posted on the other issue I had to create the filepath myself, but I'm not likely to be making more than 2-3 rulesets so that's not a big worry.
I'm a very newbie (5 weeks in my spare time) systems admistrator on a squeaky new VDS so can only blame myself for
:)
Comment #5
dopry commentedI'm glad you got it worked out... Open a new patch for the cropping thing, remember it won't crop unless the image is smaller than the crop dimensions.
Comment #6
stanbroughl commentedCheers! sorry for not replying to all these things this week, i've been out in the middle of switzerland with the worst internet connection ever lol!
i'll have a proper investigate later but it all looks good at the moment - thanks for all your help!
Comment #7
(not verified) commented