I set Brilliant Gallery in the settings to file caching, having the temp directory set to /tmp by default.
1) After having displayed a gallery with the browser, no image cache files (bg_*) are created in the directory, though caching seemed to work (did some tests with the image.php file to ensure the caching).
2) Having checked the file image.php in the module directory, I found out that the function "variable_get('brilliant_gallery_cache', 'd')" returns "d" instead of "f" despite of the settings.
3) Having temporarily modified the function mentioned in 2), so that the default value parameter is 'f' instead of 'd', followup tests show that it now returns 'f'.
4) I am not a knowledgeable person regarding Drupal internals, so I don't know why the function "variable_get" doesn't work in "image.php", so I think that is an error in the module, because it should make sure the settings are read properly. Please correct me, if I'm wrong.
5) To enable file caching the hardcoded way, I leave the modification of 3) for a test.
6) To test I copy a URL found in the browser properties of a thumbnail image from the gallery in 1) to a new window of the browser (http:///sites/all/modules/brilliant_gallery/image.php&imgp=......) and find out that it doesn't work, the thumbnail image doesn't appear, only an empty page.
7) After looking into the code and echoing some values within the module file I find out that when the function "file_directory_temp" is called, php5 stops with an error (for me it was an empty page due to PHP5 configuraton), because the function is not defined within any file of the module. Again, I am sorry I don't know whether the function is a drupal function or whether it should have been defined within the module, but for this reason the file caching doesn't seem to work.
Conclusion: Because of the cooperation of the problem mentioned in 4) with the one in 7) you never see the misbehaviour caused by the problem in 7), but you also don't get file caching. Regardless of your settings you always have database caching. This is what I think, please correct me, if I'm wrong.
If my assumptions are correct, would it be possible to have a fix for a working file caching for the module?
Thnx,
Christian.
PS: Drupal 5.7 on PHP5.2.5, Mysql 5.0.26, Apache 2.2.3
Comments
Comment #1
vadim.bich commentedIt seems the image.php in release version is wrong as it does not load all of the drupal code and get_variable just does not work. If you look at the beginning of the image.php you'll find drupal_bootstrap line, try changing it to have DRUPAL_BOOTSTRAP_FULL. I tried that and it did not work well for me, but I was having independent issues, it might be ok for you.
May I suggest that you get dev verison and try my patches (http://drupal.org/node/253348) with it? I made a lot of fixes, one of the was making file system cache work. I also added checking for permissions, that was my main issue.
Comment #2
meichr commentedThanks for your update, I'll try this.
Regards,
Christian.
Comment #3
vacilando commentedThe D5 version is not supported anymore and nobody else provided a resolution here, so I am closing this (assuming most people upgraded to D6 in the meantime anyway). None of the issues are a problem in the current D6 version of Brilliant Gallery.