Hi folks; i seem to still have problems understanding how imagecache should be setup.
It worked magically for some reason and after playing with configurations on my local machine yesterday, but now I am trying to install it on server and I cannot seem to make it work in resizing user profile pictures.

Anyways, main thing is that when imagecache installs it does not create its files/ subfolder where it will

In trouble shooting guide (http://drupal.org/node/224913) it says to change the apache htaccess , what if I cant do this because working on a server where I dont have this kind of editing privileges.

Is there anything funny we need to do if we remove and reinstall the imagecache module. Will the previous settings influence the functioning of a second installation??

Other thing, I see on the imagecache page that there is a RC2 release... This comes with a bundle of other modules, including ImageAPI.
Then I also have seen other releases with no ImageAPI module in it nor forming a group in the modules installation page just for "ImageCache"..

Can anyone help trying to figure out how this module should be installed? And which versions?
When is the files/imagecache folder supposed to be created?

Any suggestions?

Comments

ronald.lew’s picture

Did you change the temporary directory for your file system in "HOME >> Administer >> Site Configuration >> File System"? I had a similar problem and I changed the temporary directory path from my win32 path to linux path (my dev environment is win32 and host is linux). If that doesn't work, you go to the imagecache administration pages and re-apply all of your settings to make sure the folders are set and created. If not, then I guess you could reinstall you module.

brollo’s picture

My local install is running in Linux Ubuntu.. My directory settings are:
Files System Path : files
Temporary directory = /tmp

Where is this /tmp taken from anyway?
Where should I make it point?

Thanks

brollo’s picture

Ok, so this is what I do:

I install fresh drupal install

Enable Clean URLs

Site Configuration > Fyle System , set paths (temporary = files/tmp, I create this directory)
It actually creates the /tmp folder in the /files folder now, so I think this should not be the main problem

.htaccess in files/ folder (Remove line "Options None"?? Is this required) ( I tried doing and not doing this step)
Any other .htaccess files I need to change?

Here I still dont enable user pictures

Install imagecache module version 5.x.1.5 ( the drupal 5 version non release candidate; the release candidate has a lot of other junk in it doing with ImageAPI module)

Any other base requirements before I actually install the module?
Does it need the Image module ( I dont think so)
Does it need CCK & imagefield ?
Is the Upload module required?

In this way it does not create its "imagecache" folder in the /files/ folder; so it cannot function..

Also if I disinstall the module, the tables from the database do not get DROPPED!! Despite the uninstall script..
Is it a good idea do drop them manually using phpmysqladmin?

Could there be anything in my server settings?

brollo’s picture

I managed to get the module working nicely in local...

Now it doesn't work on my server..

It wont create the files/imagecache/ folder in the and only upload the images to their paths in their original format.

I tried placing a jpeg file at the site.com/drupal/files folder and accessing it fro browser; get a 500 Internal Error server error..
So, first question: why cant I not see this image? Is this the main problem?
According to the imagecache troubleshooting guide (http://drupal.org/node/224913) there is a Server setting that needs changing.

What configuration do I need to have on apache for this? I dont get it!!
The .htaccess file in the files/ dir contains the "usual 2 lines", anything else in there?

What do I need to ask my hosting company to set for me?

I'm going nuts, please help

ronald.lew’s picture

I assume the following needs to be in the host:
1. php-gd extension enabled (you could do a phpinfo() to see if it's enabled).
2. apache's mod rewrite needs to be enabled (if you have clean urls, then most likely it is or you can simply ask your host provider).

Unless the host have some kind of weird setup, I don't see why it wouldn't work. You could ask to see the php error logs to verify that drupal isn't throwing any warnings.

brollo’s picture

HI gd and rewrite are already installed on my server.

I dont see the problem.

Maybe a drupal reinstall? (even though this would be drastic!!)

kayaker’s picture

I've spent the last several hours trying to get imagecache to work with Ubercart. From what I can see, something isn't distinguishing between "/" and "\".

Imagecache assumed a sites\files\ place to store its files. Once I changed that to a "forwardslash" path and verified the .htaccess, imagecache created the directories and moved the files.

I'm testing on XAMMP under Windows and if I look at the image link created by imagefield/imagecache it's the real long link outlined in the troubleshooting guide but with some \'s in the middle where everything should be forward slashes.

Testing with Drupal 5.7
Imagecache 5.x-1.5
Imagefield 5.x-1.2-rc1

I haven't run into this with other modules - any ideas?

__________________________________________________________________________________

Aweigh - not all who wander are lost.

brollo’s picture

At the end it was just commenting out the only two lines in the .htaccess file in the file folder.

Also make sure that in your Settings > File System you have files and /tmp

Make sure your .htaccess in the drupal install folder is also right and watch out if you installed in a subfolder with rewrite rules.

I think you need to have Clean URLs enabled as well ...

Thats about what I can remember

kayaker’s picture

Thanks brollo. I got it figured out. It appears that imagefield may be picking up the incorrect default path.
__________________________________________________________________________________

Aweigh - not all who wander are lost.

ronald.lew’s picture

I'm curious about the contents of the .htaccess file that you had to comment out.

--Ron

There will be no bootleggers if everything is open source.

kayaker’s picture

I removed the options none from the .htaccess in the files directory per the instructions in Step B.4 of Troubleshooting imagecache however I'm not convinced that was the problem.

The reason I was interested is that I installed imagecache to support Ubercart. It wouldn't work and that led me to a very long ongoing discussion on Ubercart's forum: Images not showing up. In that forum they have other suggestions for changing .htaccess. I tried those but they did not work for me.

Because I experimented a lot, I cannot positively say what corrected the problem. However, I believe that the Ubercart created imagecache field's default imagepath was incorrect.

__________________________________________________________________________________

Aweigh - not all who wander are lost.

aterchin’s picture

i'm having the same problem. still trying to figure this out. changing the htaccess line so far doing zilch.

kayaker’s picture

Using Firebug, I was able to see what paths imagecache was using. Those paths were incorrect and that led me to the solution of changing the Ubercart created CCK imagefield file path setting.

It was also helpful to go through the Troubleshooting imagecache step by step and testing.

It took me over four hours to get this working and I wish that I had a simple answer.

__________________________________________________________________________________

Aweigh - not all who wander are lost.

aterchin’s picture

firebug reveals nothing here. using the devel module i get [view] => <!-- imagecache formatter preset() not found! -->

aterchin’s picture

OK. we're all good. On the image field display settings for my cck type, i had the option set to 'medium' (my preset) as opposed to 'medium as link to node' or 'medium as link to image' etc... this looks like an imagecache code bug to me. All my .htaccess defaults that i've never messed with work just fine. my htaccess has 3 lines in it

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks

and my temporary folder is set inside the files directory
and the imagecache folder permissions are set to 755.
i havent changed anything from the defaults.

So, my solution is to just use any other cck field display setting for your images other than the one that's JUST the name of the preset.

mikl’s picture

I had the same problem with <!-- imagecache formatter preset() not found! -->.

It worked after changing preset. So I changed it back to experiment some more, but now that works as well. That leads me to think that whatever was stored in the database before was somehow invalid in newer versions of imagecache. But now it works.

aterchin’s picture

glad to hear it. actually having it set to "[preset] as link" ended up working out better for me so i stuck with it. i haven't tried to set it back the original way as [preset] since cause i don't need it. :) usually the workaround for a fix often times ends up bringing up the best solution for me.