Mail Index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [ApacheGallery] help with chached files needed!

ES>> hello [email protected] !

ES>> i have problem with chached thumbnails.
ES>> when i go to some URI within my gallery, i get thumbnails preview,
ES>> but in the server's error log i aways get errors like this
ES>> - this an URL

ES>> [Thu Jun 17 12:58:58 2004] [error] [client] File does not exist:
ES>> /var/www/, referer:

ES>> but chached files are stored in GalleryCacheDir which is in
ES>> /tmp/Apache-Gallery
ES>> and there is directory
ES>> /tmp/Apache-Gallery/gallery/diving/10.2002/ with thumbnails, e.g.
ES>> 100x75-DSC00438.JPG (original picture is in
ES>> /var/www/

ES>> how can i get rid of this error message?

ES> Furthermore. i created this .cache directory manually, now i get
ES> errors like this

ES> [Thu Jun 17 13:14:31 2004] [error] [client] File does not exist:
ES> /var/www/,
ES> referer:

ES> so, the html code of a page refers to
ES> which actually doesn't exist. this thumbnail is in /tmp directory.
ES> trying to look the source code, but i don't understand perl much, so
ES> this is hard for me to find the bug.
ES> any help would be appreciated

I found the solution for this issue.
here, starting from line 106 of

if ($r->uri =~ m/\.cache\//i) {
  my $file = cache_dir($r, 0);
  $file =~ s/\.cache//;
  my $subr = $r->lookup_file($file);

  if (MP2) {
  else {

>>here!!  return MP2 ? Apache::DECLINED : Apache::Constants::DECLINED;

why there is DECLINED here? as far as i understand, cache_dir() dies
if it cannot create thumbnails. So, if there is no thumbnail and it
cannot be created, script dies with an error. I think there is no
sense in DECLINED here. I wrote Apache::OK there
and Apache::Constants::OK. Messages from apache errorlog disappeared,
now it work as expected (by me,anyway).
i suggest you make this change permanent in source code tree...

best regards
[email protected]

users mailing list
[email protected]