| Author |
Message |
wellie
Beginner


Joined: Jul 30, 2003 Posts: 7
|
Posted: Fri Aug 01, 2003 3:21 am Post subject: Re: Block error: rand() & Call to a member function |
|
|
Yay! Fixed!
Thanks to the Gallery Forums - found the fix in this thread [menalto.com]. Thanks to hawkin.
Undo the fix above if you made it and insert
Code: › $count = floatval($count);
in front of:
Code: › $choose = rand(1, $count);
Appears it is a conflict with some PHP versions. Now is working absolutely fine. Should this be incorporated into the release on the downloads page? |
|
| Back to top |
|
|
AdBot
|
| Post subject: Re: Block error: rand() & Call to a member function |
|
|
|
|
|
| Back to top |
|
 |
wellie
Beginner


Joined: Jul 30, 2003 Posts: 7
|
Posted: Fri Aug 01, 2003 4:33 am Post subject: |
|
|
Quote: ›
Yay! Fixed!
Argghh. Spoke to soon. Still getting the occasional out of bounds error. Anyone? |
|
| Back to top |
|
|
corduroy
Beginner


Joined: Apr 17, 2003 Posts: 4
|
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6271 Location: Washington Township, NJ, USA
|
|
| Back to top |
|
|
nukestud
Beginner


Joined: Apr 13, 2003 Posts: 13
|
Posted: Sat Aug 02, 2003 1:08 am Post subject: |
|
|
I tried that fix dari, doesn't work!
If I delete the block-random.cache it works once then not again untill I delete the block-random.cache again.
I am running random photo, hourly photo, new albums horizontal and most viewed. I got the other ones to work until I added most viewed block now problems.  |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6271 Location: Washington Township, NJ, USA
|
Posted: Sat Aug 02, 2003 6:16 pm Post subject: |
|
|
actually, this looks to be more of a gallery error...try getting the newest CVS and see if it still occurs. _________________
 |
|
| Back to top |
|
|
nukestud
Beginner


Joined: Apr 13, 2003 Posts: 13
|
Posted: Sat Aug 02, 2003 6:32 pm Post subject: Re: Block error: rand() & Call to a member function |
|
|
Yeah I got it all working after pulling my hair out for hours lol If I were asked to do it again I wouldn't know where to start It seems after all the fixes etc the only way I could get all the blocks working together was in the right side!
Just one thing I can't seem to do is get a border around the image in the random block, or the most viewed! Funny thing is the hourly one which is really straight forward in the random_support.php doesn't seem to apply for the random option!
Cheers |
|
| Back to top |
|
|
slackbladder
Moderator


Joined: Mar 29, 2003 Posts: 1038 Location: Cambs,UK
|
Posted: Sun Aug 03, 2003 3:42 am Post subject: Re: Block error: rand() & Call to a member function |
|
|
nukestud wrote: › Just one thing I can't seem to do is get a border around the image in the random block, or the most viewed! Funny thing is the hourly one which is really straight forward in the random_support.php doesn't seem to apply for the random option!
Cheers
Try this:
http://www.nukedgallery.net/postt78.html [nukedgallery.net] |
|
| Back to top |
|
|
switch
Novice


Joined: Jul 09, 2003 Posts: 23
|
Posted: Fri Aug 22, 2003 8:11 pm Post subject: Re: Block error: rand() & Call to a member function |
|
|
since the quick fix for this error is by deleting the block-random.cache file . How about using the crontab ? like make it delete the block-random.cache like every 30mins or something . though i dont know how to use the crontab though  |
|
| Back to top |
|
|
|
|
|
|
|