Welcome to Geeklog, Anonymous Monday, December 05 2022 @ 07:35 pm EST

Geeklog Forums

Random Block error - help me pls.


Status: offline

etegration

Forum User
Full Member
Registered: 02/20/02
Posts: 179

Hi All, i have gallery 1.3.4 install and integrated with Geeklog with no prob but when i install Blaine\'s random photo block, i get the following error:

Warning: fopen(/home/itcow/public_html/gallery/block-random.cache) [function.fopen]: failed to create stream: Permission denied in /home/itcow/public_html/gallery/platform/fs_unix.php on line 53

Why? I\'ve checked, there is no block-random.cache so i created a blank file with that name, upload it, the error changes to the following

Warning: Invalid argument supplied for foreach() in /home/itcow/public_html/block-random.php on line 97

Then i tried CHMOD that file to 777, and it\'s the same error:

Warning: Invalid argument supplied for foreach() in /home/itcow/public_html/block-random.php on line 97

So i delete that file, the first error message comes back but the random photos does appear on the block. Please take a look @ http://www.itcow.com I\'ve left it as it is for the moment.


http://www.etegration.com.sg
http://www.itcow.com
http://www.ministryofhosting.com
 Quote

Status: offline

etegration

Forum User
Full Member
Registered: 02/20/02
Posts: 179

Status: offline

jadiepoo

Forum User
Chatty
Registered: 01/11/03
Posts: 43
i had a similar problem with my site when my host changed some settings around and started messing up some of my file permissions (gallery/geeklog was working fine and dandy till that point). The stuff i changed were: - Made sure the cache file line in lib-custom is
Text Formatted Code
define(CACHE_FILE, \"/tmp/block-random.cache\");
and replaced
Text Formatted Code
 $choose = rand(1, $count);
to
Text Formatted Code
 $choose = rand(1, intval($count));
in block-random.php I also emptied out block-random.cache just to make sure and chmodded the files back to 777
 Quote

Status: offline

jadiepoo

Forum User
Chatty
Registered: 01/11/03
Posts: 43
btw, those are from squatty\'s site
 Quote

Status: offline

etegration

Forum User
Full Member
Registered: 02/20/02
Posts: 179

BDUB

Anonymous
happy
THANK YOU!!!!!!!!!!!
 Quote

Status: offline

ppmnt

Forum User
Chatty
Registered: 06/09/04
Posts: 53
FYI, the usual place for cache files would be your albums directory. If you are sharing the system you may not want to use /tmp, but your albums directory is writable by the web server user so it's a good place for this.
 Quote

All times are EST. The time is now 07:35 pm.

  • 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