Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am using cleanURL's and public file system. It was working well, but after updating to D6.14 core version, image doesn't create files. Also files inside the imagecache folder cannot be displayed.
Any ideas?
Comments
Comment #1
introfini CreditAttribution: introfini commentedI'm having the same problem. I don't now if it's related to having PHP 5.3
introfini
Comment #2
introfini CreditAttribution: introfini commentedI've tested in another box with php 5.2.9 and it works great.
@etcetera9 what's your php version?
introfini
Comment #3
madra CreditAttribution: madra commentedsame problem here as the original poster.
ubercart generated imagecache images are working fine, but none of my own defined presets work any more, after upgrading to drupal 6,14. even tho' the images are being created on the server, nothing is being displayed.
[i'm running PHP 5,2,9]
Comment #4
madra CreditAttribution: madra commentedFOLLOW-UP:
on further investigation, i'm beginning to wonder whether the culprit may not be imagecache after all. i had the following symptoms:
since i'm juggling three variables here; imagecache, views and thickbox, i decided to simplify things a bit and so changed the views module output to just generate the imagecache thumbnail linked to the imagecache fullsize , rather than imagecache thumbnail linked to imagecache fullsize displayed in a thickbox popup.
success! - all my imagecache thumbnails are now displaying properly on my pages again and, clicking on them links to the full version [although obviously i've now lost my thickbox ajax popups]. so, i'm now coming round to thinking that the guilty party might actually be thickbox, rather than imagecache.
i realise that, if so, this now becomes a thickbox issue, rather than an imagecache one, but i thought i'd post my findings here, in case anyone else is having similar problems and assuming that the drupal upgrade has broken imagecache.
[Drupal 6.14, ImageCache 6.x-2.0-beta10, Thickbox 6.x-1.5, Views 6.x-2.6]
Comment #5
rena_obadia CreditAttribution: rena_obadia commentedSame problem here after upgrading.
I have private file system, php 5.2.9
Comment #6
madra CreditAttribution: madra commentedwell, i've fixed my problem. it did turn out to have been caused by thickbox, after all. the latest version of thickbox removes a redundant variable in a function that i'd overridden in my site's theme. so imagecache was working all along. it was thickbox which was broken and unable to display the images or thumbnails.
now, it's pretty unlikely that this obscure set of circumstances will be the same ones that are causing the rest of you to have problems, but just on the off-chance, here's the thread wherein i solved mine:
http://drupal.org/node/588616
Comment #7
scifisi CreditAttribution: scifisi commentedYup, same problem as everyone else. I get the imagecache flder being created but that's all that imagecache does. No subfolders, no thumbnails and no images. I'm using Drupal 6.14
My sites/default/files/imagecache directory is fully writable so it's not a permissions thing...
Anyone with any ideas?
Comment #8
robertgarrigos CreditAttribution: robertgarrigos commentedhaving exactly the same problem. whenever I create a new preset a new folder inside of imagecache folder is created and the imagecache_sample.png file is copied there. Once I create and action for that presest the sample image disappears.
Comment #9
ultrajet CreditAttribution: ultrajet commentedSame problem here, imagecache doesn't display thumbnails and can't display when used together with imagefield
Comment #10
nunami CreditAttribution: nunami commentedI am having a similar problem. The thumb images are now created in files/imagecache_thumbs rather than the previous files/imagecache/thumbs
Is this a problem with specifying where the files are to be saved?
Comment #11
schlotterich CreditAttribution: schlotterich commentedsame problem here...... i think we need a patch to fix this fast!
Comment #12
rainbreaw CreditAttribution: rainbreaw commentedI think I had a similar problem which I just fixed by manually editing the imagecache.module file (gulp...) (and just added a note about this to this node as well: http://drupal.org/node/392100)
I was getting this error:
(meaning: the directory exists and so imagecache won't create it, but for some reason it also won't create the image in the directory that exists)
I solved my problem by adding a check for the directory by changing line 555 of the imagecache.module file from:
to:
I'm not a php developer and don't feel confident creating or issuing a patch, but perhaps this will help get to the root of the issue people are reporting?
Comment #13
schlotterich CreditAttribution: schlotterich commentedthanks for the hint rainbreaw but it didnt work for me :(. i still can't see the pictures created with imagecache.
i recognized that the files are created directly in the files/preset directory and not in files/imagecache/preset as before, but the links to the images are still pointing to files/imagechache/preset
Comment #14
ultrajet CreditAttribution: ultrajet commentedCould it be the responsibility of the image api? That's the error that pops up.
Comment #15
mirrie CreditAttribution: mirrie commentedI am using imagecache to display FastGallery images and I just recently noticed (after upgrading imagecache Module to vers 6.x 2.0 10 beta) after flushing the cache and rescanning for new pictures that my imagecache directory holds some pictures for the thumbnail preset I use in the gallery but for the big image preset there are just some random pictures present. So no wonder that the Gallery cannot display any of them when clicking on the thumbnail link.
I cannot tell whether this issue came up when I upgraded Drupal to 6.14 .Since some of the pic still work it might very well be I did not notice the problem at that time. Did anyone get ahead on this issue?
Comment #16
crosendahl CreditAttribution: crosendahl commentedSame problem. Just upgraded from Drupal v6.12 to v6.14, and from imagecache 6.x-2.0-beta9 to 6.x-2.0-beta10.
Images no longer are showing up. Tried creating a new preset, and it created the folder just fine. Uploaded an image, and it gets saved in the correct file. Directory permissions are correct.
I'm using private files, so that whole section of my server wasn't touched when I did the upgrade.
Comment #17
crosendahl CreditAttribution: crosendahl commentedI reverted back to 6.x-2.0-beta9, still with Drupal v6.14, and everything works fine again.
I would say the problem is definitely with beta10.
Comment #18
mirrie CreditAttribution: mirrie commentedI went back to 6.x 2.0 beta9 and it did not change things for me. When I rescan Fast Gallery for images it claims to create the directory " directory files/imagecache/fast_gallery_thumb/photos/07 has been created" but inside there is only the first thumbnail.
Comment #19
swappedsr CreditAttribution: swappedsr commentedSame problem here, file seems to upload fine to both /files and /imagefield_thumbs directory, however, when viewing the source code on my products page the image is pointing to a folder within image cache, which does not exist and neither does the graphic. I am assuming the presets should be folders within imagecache so I tried to manually create them and tried uploading a graphic, I can upload and it previews fine without errors, but the graphic wasn't found anywhere in the presets folders I manually created. This has to be a bug.
Also, mine didn't happen on an upgrade. I have Drupal 6.13 and php 5.2
So frustrated, I have been at this for hours.
Comment #20
swappedsr CreditAttribution: swappedsr commentedAnybody with insight into this issue? Fixes, workarounds?
Comment #21
crosendahl CreditAttribution: crosendahl commentedJust a reminder to check permissions for the imagecache module and make sure that you have permission to view images from the profile you're using (admin/user/permissions). I forget that step sometimes when I create a new profile and it really messes me up for awhile.
Also, if you're in maintenance mode and have a Private file system it won't display any of the images.
Comment #22
swappedsr CreditAttribution: swappedsr commentedGuys I am on IIS, so I think I am in a different category, working through a fix that someone else posted here, in case anyone else is working in IIS.
http://www.caspianit.co.uk/imagecache-wrong-path/comment-page-1/#comment...
Comment #23
Anonymous (not verified) CreditAttribution: Anonymous commentedProblem here too :(
Recent upgrade to 6.14 (as well as captcha, date, draft, filefield, fivestar, imagefield, pathauto, poll, print, quotes, sign-up, views_attach & webform).
Have a cck/views/imagecache/views_attach/node reference url/lightbox gallery.
Created a new gallery and there wasn't the usual "Add Photo" link. Solved that by editing node reference url data.
Uploaded an image, the cropped image would not show (just a border around the image title).
Moments later, visiting another gallery - the gallery was completely empty.
Hours later I discovered the View had disappeared. (It was not deleted by me).
So I re-created the View for the galleries (with the image being 'Lightbox2: crop->original ') but they still do not show images. (Edited one and re-saved just in case that would work too).
Checked File system and can see: the full size images in the designated site images folder and the thumbs in imagefield_thumbs directory. The source code for the photo in the gallery though is pointing to imagefield/crop which is empty.
If I select the full size photo as what is rendered in the gallery View the full size image shows.
Even if I 'bypass' Lightbox2 and choose 'crop image linked to image ' it still doesn't render a crop image. So its not Lightbox.
Hope this helps squash the bug.
Comment #24
jphelan CreditAttribution: jphelan commentedSame problem, I was on 6.13 and it stopped working, not sure when. Upgraded to 6.14 and it still does not work. What is really strange is I have a multi install and sites running the same drupal code base and same modules are not having the problem, only one of the sites is. Same directory permissions. So weird. Any body got anything on this?
Comment #25
Bobuido CreditAttribution: Bobuido commented(subscribing)
Sounds like I have the same problem (although there seem to be a lot of variants here!)
Recently upgraded from 6.13 to 6.14 & I also recently upgraded from Filefield 3.0 >> Filefield 3.2
Files upload fine and imagefield thumb is created but no imagecache file is created in the pre-existing thumb preset directory
I've had similar problems with IC before. Hopefully this time I can resolve them!
Comment #26
byronveale CreditAttribution: byronveale commentedSee http://drupal.org/node/410200 also...
Comment #27
jphelan CreditAttribution: jphelan commentedOk I'm running 6.14.
- I've tried ImageCache 6.x-2.x-dev (2009-Oct-08) and 6.x-2.0-beta10.
- I have clean URLs on and public file system.
- Permissions are set 777 on everything and owner is correct
- I've tried all the suggestions about changing this or that or deleting and recreating the .htaccess file
- I've tried this http://drupal.org/node/410200#comment-1709746
- and this http://drupal.org/node/410200#comment-2005114
- as well as this http://drupal.org/node/241541#comment-2118354
- and this http://drupal.org/node/241541#comment-2196200
And nothing works! Again what is really strange is that it's only one site in a multi install, so they're using the same drupal install and the same modules and three work fine and one doesn't. This is killing me.
Comment #28
Anonymous (not verified) CreditAttribution: Anonymous commentedSubscribing.
Wow, if anyone knows of a solution, even a half measure, please help.
Kahenya
Comment #29
jthomasbailey CreditAttribution: jthomasbailey commentedsubscribing
Tried downgrading/uninstalling Imagecache, Imageapi, Imagecache profiles & Views, no luck. Even tried downgrading core to 6.13, which I don't recommend to anybody.
Comment #30
Bilmar CreditAttribution: Bilmar commentedsubscribing
Comment #31
jthomasbailey CreditAttribution: jthomasbailey commentedOkay, progress:
First thing, if you think you may be going insane, clear your browser's cache.
Second, it seems to be getting stuck in a loop when you upload jpg files. Only jpgs. Pngs and gifs work fine but if I upload a jpg I get "too many HTTP redirects".
Safari says:
Chrome says:
Firefox and Opera say pretty much the same thing.
Comment #32
Ariler CreditAttribution: Ariler commentedI'm not sure if this is the same issue others are experiencing but is sounds similar here is a picture of my issue. (Also how can I subscribe to this?) As shown in the picture the image simply doesn't show up.
Comment #33
jthomasbailey CreditAttribution: jthomasbailey commentedI finally solved my jpg infinite loop problem by either uninstalling and reinstalling Imagecache or more likely deleting everything in the sites/default/files/tmp folder. But I have to say I'm a little nervous about using this on a production site with this bizarre behavior.
Comment #34
jphelan CreditAttribution: jphelan commentedI had two sites this was happening on. Uninstalling and reinstalling Imagecache worked on one. The other one I noticed a .htaccess file in the sites/mydomain.com/ folder. Once I deleted it it started working again. No idea where it came from, none of my other sites have one in there. Man I spent a lot of time on this.
Comment #35
aacraig CreditAttribution: aacraig commentedIn tracking down the infinite redirect problem, I discovered that if for some reason you have a stale image creation process in progress, you may end up with invalid images in your tmp directory that cause imagecache to go into an infinite loop.
Fix the problem by clearing your /tmp directory. If you're not sure where that is, open sites/all/modules/imagecache/imagecache.module and add the following code after line 418:
Then, load any valid imagecache url, for example: http://example.com/sites/default/files/imagecache//imagecache_sample.png
The printed value is the file that is causing the problem. Delete it. Don't forget to remove your debug code.
Comment #36
Anonymous (not verified) CreditAttribution: Anonymous commentedA solution that worked for me after a lot of digging. This has been tested on Drupal 6.14 and the new 6.15 on my dev machine sporting PHP 5.3 and a production server with PHP 5.2.11
The bug is with imageapi and PHP (5.2.11 - 5.3).
Required - Imageapi 6.x-1.x-dev - http://ftp.drupal.org/files/projects/imageapi-6.x-1.x-dev.tar.gz
Imagecache - 6.x-2.0-beta9 - http://ftp.drupal.org/files/projects/imagecache-6.x-2.0-beta9.tar.gz
Make sure you have the following versions of modules if this affects you. Even if you have them, uninstall, and reinstall. Don't do update. Make sure its a clean uninstall and install. No shortcuts.
Change the following line in imageapi.module (line 164)
Make sure you have chown and chmod access cause if you don't, then it won't work. Make sure you have access to your /tmp folder that the module has read/write access to this folder. Make sure the folder is absolutely empty. Make sure that there is also r/w access to the files and imagecache folder and all subfolders and that chown is right.
After reinstalling imagecache, go to the settings section, create a new present and make sure you see a picture during/after creating the preset. If its blank, you still have issues. If you see the picture, everything is ok.
Cool.
Kahenya
Comment #37
jthomasbailey CreditAttribution: jthomasbailey commentedthis is for the tmp/infinite redirect problem?
Comment #38
Anonymous (not verified) CreditAttribution: Anonymous commentedNo, this is if your imagecache was absolutely 100% dead like mine was. I don't know exactly what to call the bug but if your imagecache is not working and you tried everything else, try this. It should work.
Comment #39
kint CreditAttribution: kint commentedKahenya, you are a godsend. I actually registered just to post this. It works for me on the following:
PHP 5.3.1
Drupal 6.14
Imageapi 6.x-1.6
Imagecache 6.x-2.0-beta10
This problem sneaked up on me while I was upgrading my PHP.
Comment #40
rileg CreditAttribution: rileg commentedThanks a lot Kahenya! works for me as well ; )
Comment #41
anil614sagar CreditAttribution: anil614sagar commentedThanks a lot Kahenya! works for me as well :-)
Comment #42
arhak CreditAttribution: arhak commented#36 needs maintainer's review, right?
Comment #43
nareshkosgi CreditAttribution: nareshkosgi commentedKahenya,
I tried what you said and it did not work. Here is what I did step by step so let me know if I messed up at any step. Thank you in advance.
1. I uninstalled CCK, imagefield, Filefield, image API and imagecache by unchecking them from the modules list.
2. After that I went to the modules folder and deleted the modules out of the folder.
3. I deleted all the folders created initially by imagecache in /sites/default/files
NOTE: I was able to delete all the folders in /sites/default/files by selecting them all but imagefields_thumbs would not delete and I got an error message saying I do not have permission. So I deleted it using command line. Also imagefields_thumbs was the only folder with the subdirectory inside called images from before so there was something that was able to be written in here.
4. After deleted everything I went online and got fresh copies of CCK, imagefield, Filefield, imageAPI, and imagecache
5. Then I opened up imageapi and went to line 164 and made the change.
6. After that I installed the modules again.
7. I tried to create the preset but it did not work as the sample image did not show up.
Comment #44
Bobuido CreditAttribution: Bobuido commentedI could be wrong NareshKosgi (I've yet to try #36 Fix) but I think kahenya meant unistall by going to the "Uninstall" Tab on the modules page (/admin/build/modules/uninstall)
If you simply uncheck the boxes on the main modules page (/admin/build/modules) then you are in fact _disabling them_ and _not uninstalling them_
Be aware that by uninstalling them as described you will lose any data associated with those modules
Always do a backup in case you end up worse off!
Apologies if this is what you'd already done but just clarifying for anyone who's uncertain
Comment #45
nareshkosgi CreditAttribution: nareshkosgi commentedBobuido thanks for the help I am new to drupal and didn't think of that. Thanks for the help. That helped me with some issues with image cache but I still have one last problem..
update on my problem:
Whenever I create an action for a preset the images are never created (and have set the line in 164 and it does not help and made the folders private). Do I need to install GD library or imagemagic library for the actions to occur?
If I set no actions everything works fine (directories are made images are created) but then again there really isn't a point to using image cache if I can't set actions....
However, if i set an action the images are never created in the image cache directory. thanks in advance for any help
-Naresh
Comment #46
Bobuido CreditAttribution: Bobuido commentedGlad that helped :) Everyone's new to Drupal at some point
Yes the actual image actions (e.g. scale) are performed by whatever library you choose - So enable one of them on the Modules Page
Imagecache will require _one_ to carry out any image manipulation - Not both
The Status Report page ( /admin/reports/status ) will tell you some info if you use GD Library - I'm not sure if the same applies to imagemagik (I've only ever used GD so far)
Comment #47
nareshkosgi CreditAttribution: nareshkosgi commentedThanks a lot now everything works!!
Comment #48
perkywebdesign CreditAttribution: perkywebdesign commentedThank you, thank you, thank you!! Kahenya, you're a life-saver, this worked PERFECT for me!
Comment #49
drupalsteve CreditAttribution: drupalsteve commentedKahenya:
I spent all day trying to get ImageCache to work; your process finally fixed it. Thanks.
Comment #50
Anonymous (not verified) CreditAttribution: Anonymous commentedHmmm....server is only using PHP 5.2.9How far back does the issue with PHP go then?New site with Drupal 6.15, Image api 6.x-1.6, Imagecache 6.x-2.0-beta10 isn't even creating the imagecache preset folders let alone the images.Don't worry, something I did has made it work for now :)
Comment #51
RobW CreditAttribution: RobW commentedI am having the same problem as #33 and #35 but don't have a sites/files/tmp directory, so I assume no stale image creation process. Uploading .pngs instead of .jpgs works around the problem. 2 questions:
@ #35: Where in the module code should that snipped be inserted? I tried on line 419, but I think my imagecache version is different than what was being used back in dec and the result was a file location that did not exist on my server.
Anything else that could be causing the problem off the top of your head besides a stale proccess / lockfile?
I have not tried kahenya's fix in #36, seems like there are two issues here and theirs is for the other one.
Comment #52
Bobuido CreditAttribution: Bobuido commentedI'm not sure how much that process helped in the end but I was still unable to get Imagecache working after going through Kahenya's steps
I've finally resolved the issue by commenting out some old Apache re-write rules I found laying about. I think they were left over from an old version of our website. I think originally they were implemented for CleanURLs to function but are now obsolete. Or perhaps they were never required in the first place... Regardless, now they're removed all seems well!
If like me you've tried everything, take a look through your Virtual Hosts config and see if there's anything there. If it worked in your dev environment but not on your production server it may be something you've overlooked (although unlikely)
Also just to say I'm running with ImageAPI-dev (as detailed by Kahenya) and beta10 of Imagecache. Thought I'd better try and upgrade given it has a security patch. :)
Comment #53
benone CreditAttribution: benone commentedkahenya: THANKS!
I just made those changes in last imageapi version an imagecache beta 10
old - array_unshift($params, $image);
new - array_unshift($params, &$image);
WORKS
Comment #54
YK85 CreditAttribution: YK85 commentedsubscribing, is there a permanent fix to this issue?
Comment #55
semantric CreditAttribution: semantric commentedI had this issue and it seems to be fixed after applying the fix described in #53. Makes sense, because for me, PHP 5.3 introduced a warning that said that imageapi.module was passing by value to a function that expected a reference.
This page talks about the new warning as of PHP 5.3:
http://php.net/manual/en/language.references.pass.php
"Note: There is no reference sign on a function call - only on function definitions. Function definitions alone are enough to correctly pass the argument by reference. As of PHP 5.3.0, you will get a warning saying that "call-time pass-by-reference" is deprecated when you use & in foo(&$a);."
My guess is that somehow this change in PHP's behavior broke the imageapi module.
I did not uninstall or reinstall anything, I just added the ampersand. Seems to work -- so far! Use at your own risk.
Comment #56
semantric CreditAttribution: semantric commentedThis is weird because, looking at the PHP note, it seems like exactly the opposite thing (HAVING an ampersand) should cause a warning.
Comment #57
semantric CreditAttribution: semantric commentedFound a probably better patch here:
http://drupal.org/node/540486#comment-2616056
Comment #58
drewish CreditAttribution: drewish commentedOkay this totally seems like a duplicate of the ImageAPI link everyone keeps linking to. That's been fixed and ImageAPI 6.x-1.8 is out so go upgrade and re-open this if problems persist.
Comment #59
ikeigenwijs CreditAttribution: ikeigenwijs commentedsubscribe, all the same problems as above
Comment #60
mbbala CreditAttribution: mbbala commentedi had the same issue,
what i did is
i changed the directory /files/imagecache permission to 777
and line no 555 on imagecache.module to 0777
hope this helps
Comment #61
cjwood555 CreditAttribution: cjwood555 commentedThe fix above did the trick but only when upgraded to current dev version of imageapi and beta of imagecache
Thanks :)
Comment #62
Lerain CreditAttribution: Lerain commentedAfter trying all the other fixes suggested in the numerous topics about this issue, mbbala's fix in comment #60 made it happen - thanks a ton!
Comment #63
cjwood555 CreditAttribution: cjwood555 commentedPlease note, I had to do the above AND get my host chown the relevent folders to php.
HTH
Chris
Comment #64
sydneyshan CreditAttribution: sydneyshan commentedI had the same issue (infinite loop when trying to access an imagecache image), but it ended up being the 'tmp' directory contents (as referenced in #36). Deleting the offending temp imagecache image from the 'tmp' directory fixed the issue for me. It seems to occur when imagecache gets more than one request to generate an image in short succession (especially if the image takes a while to generate). The presence of a 'temp working' file in the 'tmp' directory messes up the workflow.
Just my two cents ... none of this is backed up by code exploration - just theorising!
Comment #65
geerlingguy CreditAttribution: geerlingguy commentedAnother post just confirming that emptying the tmp directory solved the infinite redirect issue.
Comment #66
matifrao CreditAttribution: matifrao commentedI am also facing the issue. My images are not shown. I was seeing backup option it asked me to create back and try to create a directory and it made every thing worst. now I do not have backup and images are also not shown in my website can anyone help me to resolve