Welcome to Geeklog, Anonymous Sunday, September 08 2024 @ 12:54 am EDT

Geeklog Forums

Problem with Gallery Random Photo Block


Anonymous

Anonymous
This is the error message I get:Warning: fopen("/block-random.cache", "w"Wink - Permission denied in /home/chaara/public_html/gallery/platform/fs_unix.php on line 53At the top of my page, I receive this error when I access (successfully) my gallery via the random phot block in geeklog. I've searched Squatty.com but the fixes suggested there aren't so much fixes as just changes to error reporting levels to ignore the problem.My gallery and geeklog still work fine with this error, although I suspect there may be issues with the random block cache being updated if this file can't be opened/written to. Regardless, I don't like errors.Has anyone fixed this issue for themselves?Thanks,Adrian
 Quote

Anonymous

Anonymous
That looks like a permission problem. You probably need to change the directory and/or file to give write permission to group and/or the public.
 Quote

Anonymous

Anonymous
The directory that files resides in is already writeable and the file itself, even when changed to 777, produces the same problem. Thanks though - anyone else? Please?
 Quote

Anonymous

Anonymous
I had the same problem, I did chmod 777 gallery and removed the block cache file altogether. When the gallery is next accessed, it'll be rebuilt.
 Quote

Anonymous

Anonymous
Thanks for replying, but that didn't work. I don't totally understand what you CHMODded to 777 - the gallery directory or a file - but I tried more liberal permissions on a few different items and nothing worked. I also tried deleting the block-random.cache file and sure enough it was rebuilt, but still produced the same error message as before when the gallery was accessed. I hate to be one of these people that just continues to have an issue long after viable solutions have been offered, but I still have this issue. Is there any other fix someone can think of? Thanks so much, Adrian
 Quote

Status: offline

vinny

Site Admin
Admin
Registered: 06/24/02
Posts: 352
Location:Colorado, USA
I'm not sure if this is a problem, but the fopen command is being done in the root director '/'. Check your paths and try entering a path name such as /path/to/public_html/ for the galleryblock.cache file. -Vinny
 Quote

Anonymous

Anonymous
Actually I think Vinny has a point here, Check that the path to your gallery directory is set up properly as it may be trying to open '/block-random.cache' instead of what you really want, which is '/path/to/html/gallery/block-random.cache'. In my previous msg, I chmoded the gallery directory to 777 until the cache file was written and then changed it back to 755 after it was and made sure the cache file was 777.
 Quote

Anonymous

Anonymous
OK, so thank you to everyone who replied. In the end, it was a paths issue. In this portion of the random photo section of lib-custom.php: /* Initializing the seed */ srand ((double) microtime() * 1000000); define(CACHE_FILE, $gallery->app->albumDir . "/block-random.cache"Wink; define(CACHE_EXPIRED, 86400); The $gallery->app->albumDir . "/block-random.cache" didn't seem to be resolving to the album directory correctly. So I simply hardcoded it to be: define(CACHE_FILE, "/home/chaara/public_html/gallery/albums/block-random.cache"Wink; This worked perfectly and the error message disappeared. Is there any reason why hardcoding the path like this might cause issues in other areas? I can't think of why it would. Thanks again. I am very impressed with the helpfullness of the GL community! Adrian
 Quote

All times are EDT. The time is now 12:54 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content