The Ultimate Weblog System

Welcome to Geeklog
Tuesday, February 09 2010 @ 06:35 PM EST


 Forum Index > Support > Plugin Help New Topic Post Reply
 Random Block error - help me pls.
 |  Printable Version
etegration
 July 12 2003 23:45 PM (Read 2759 times)  
Forum Full Member
Full Member

Status: offline

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
 
Profile Email Website PM
Quote
etegration
 July 17 2003 06:13 AM  
Forum Full Member
Full Member

Status: offline

Registered: 02/20/02
Posts: 179

anyone?


http://www.etegration.com.sg http://www.itcow.com http://www.ministryofhosting.com
 
Profile Email Website PM
Quote
jadiepoo
 July 19 2003 17:11 PM  
Forum Chatty
Chatty

Status: offline

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

PHP Formatted Code
define(CACHE_FILE, \"/tmp/block-random.cache\");

and replaced
PHP Formatted Code
$choose = rand(1, $count);

to
PHP 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


 
Profile Email Website PM
Quote
jadiepoo
 July 19 2003 17:16 PM  
Forum Chatty
Chatty

Status: offline

Registered: 01/11/03
Posts: 43

btw, those are from squatty\'s site


 
Profile Email Website PM
Quote
etegration
 July 21 2003 11:29 AM  
Forum Full Member
Full Member

Status: offline

Registered: 02/20/02
Posts: 179

It works! THanks jadiepoo! thanks!!!!!


http://www.etegration.com.sg http://www.itcow.com http://www.ministryofhosting.com
 
Profile Email Website PM
Quote
Anonymous: BDUB
 October 09 2004 18:07 PM  



THANK YOU!!!!!!!!!!!


 
Quote
ppmnt
 October 13 2004 16:18 PM  
Forum Chatty
Chatty

Status: offline

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.


 
Profile Email Website PM
Quote
Content generated in: 0.45 seconds
New Topic Post Reply



 All times are EST. The time is now 06:35 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content