hey all

Am working on a site using the Acquia Slate theme, and am having problems getting image cache to work properly.

Whenever I create new presets or edit my existing ones, while the presets are saved OK, I also receive the error message

warning: mkdir(): No such file or directory in C:\apache2triad\htdocs\finalloudnproud\sites\all\modules\imagecache\imagecache.module on line 555.

Then whenever I try to use the image field in any content the original files are uploaded to a folder I have set, but no files are uploaded to the image cache folders, which are in the same directory.

Having a look at the line in the image cache module that is referenced in the error message it says

// Build the destination folder tree if it doesn't already exists.
  if (!file_check_directory($dir, FILE_CREATE_DIRECTORY) && !mkdir($dir, 0775, TRUE)) {
    watchdog('imagecache', 'Failed to create imagecache directory: %dir', array('%dir' => $dir), WATCHDOG_ERROR);
    return FALSE;
  }

My first thought was obviously that the directory wasn't writable, explaining why both the folders and the pictures cant be created, but i dont think so because, as i said, the folder that the original images are uploaded to is in the same directory and works fine, and hence the image_field also works fine. Just seems to be the actual ImageCache moodule itself that doesn't save or create anything. I tried manually creating the folders but it didn’t seem to help, and unfortunately I don’t know enough about php to fix it any further than that.

I also thought it was maybe because I had already done a lot of work on the site and maybe changed something that was messing up the module but I also tried a fresh install of drupal and made the image settings the first thing i done after switching on the theme but still the same problem.

Any ideas anyone?

Comments

vm’s picture

ownership issue?

what did you name the manually created directory?

based on eveything I read here: http://drupal.org/search/apachesolr_search/mkdir it certainly look to be a permissions issue in some way. What permssions were you setting? have you tried 777?

kevinmcdonough’s picture

Thanks for the reply.

Hey. The folders i created were just named 'thumbnails' and 'lightbox' which i though followed the naming convention of having the same names as the ImageCache presets title?

Up until this point I haddn't changed any permission settings, I assumed everything was OK at the folders permission level because the folder that the original images were being uploaded to was in the same files folder just the same as the two for the presets and it was written to fine.

However from reading various other similar threds i'm almost certian it's a permissions issue, however not totally sure where to set it.

I am using Apache2Triad on my laptop as a virtual server and development environment so the drupal files are all on my computer. Just using normal windows explorer i have navigated to the folder and unticked the box for write-only, but is there a function within Apache2Triad to set the permissions the same way as you would on an actual server?

k

pixelz’s picture

but I had a similar issue also on a A2T local dev server. I seemed to be able to fix it by manually create the "imagecache" folder in "sites/files". once I did that my images started displaying correctly and the folders were being built properly.

HTH!