| Author |
Message |
bopile
Beginner


Joined: Jul 30, 2003 Posts: 5
|
Posted: Sat Aug 09, 2003 11:29 am Post subject: Can some plz take a look at random block |
|
|
I have been browsing through the forums looking for answers but I have not seen one that has the same problem... I finally got the gallery and the random block up. however the random block shows this messge.... above the picture....
Warning: Invalid argument supplied for foreach() in /home/careyalu/public_html/modules/gallery/session.php on line 55
It is on my homepage at http://www.***.com(earsed after i figure out how dumb i was If you do'nt mind check it out and tell me how i maybe able to fix it. Thx. I've tried messing with the session file.. but when i do i only make it worse. Any Help Appreciated. Thx.
Last edited by bopile on Sat Aug 09, 2003 12:12 pm; edited 1 time in total |
|
| Back to top |
|
|
AdBot
|
| Post subject: Can some plz take a look at random block |
|
|
|
|
|
| Back to top |
|
 |
bopile
Beginner


Joined: Jul 30, 2003 Posts: 5
|
Posted: Sat Aug 09, 2003 12:03 pm Post subject: Re: Can some plz take a look at random block |
|
|
some more info.. I posted $_HTTP_SESSION_VARS ==> $_SESSION all around the error but then it just produces parse errors...
below is the lines.. it is refering too.... where do i put this $_HTTP_SESSION_VARS ==> $_SESSION Thanks.
/* Start a new session, or resume our current one */
session_start();
/* emulate register_globals for sessions */
if (!$gallery->register_globals) {
foreach($HTTP_SESSION_VARS as $key => $value) {
eval("\$$key = & \$HTTP_SESSION_VARS[\"$key\"];");
}
} |
|
| Back to top |
|
|
bopile
Beginner


Joined: Jul 30, 2003 Posts: 5
|
Posted: Sat Aug 09, 2003 12:11 pm Post subject: |
|
|
ok.. i'm a dummy. found your old code.... for future ppl looking replace the old code with that i posted about with this at the emulate register line.....
/* emulate register_globals for sessions */
if (!$gallery->register_globals) {
foreach($_SESSION as $key => $value) {
eval("\$$key = & \$_SESSION[\"$key\"];");
}
}
Works now. |
|
| Back to top |
|
|
slackbladder
Moderator


Joined: Mar 29, 2003 Posts: 1038 Location: Cambs,UK
|
Posted: Sat Aug 09, 2003 1:14 pm Post subject: |
|
|
Bopile - Nice site BTW. Good to see a nuke site not looking too much like a nuke site!
I notice you have an OUT OF BOUNDS error - try deleting your block-random.cache - it's wrong. |
|
| Back to top |
|
|
bopile
Beginner


Joined: Jul 30, 2003 Posts: 5
|
Posted: Mon Aug 11, 2003 12:43 pm Post subject: |
|
|
-Thanks for the info... I read through the forums and saw that the cache file need to be deleted. So i did that under the albums directory. However it continued about an hour later in getting that rand() to long error in albums.php. I could not figure it out.. and assume i had an older version of random block... so i downloaded the improved random block and reinstalled everything. so far so good. but i'll be able to tell more in a day when it does a couple refreshes. I noticed some ppl posting about the last picture in the album giving you this error. I hope that's what improved random block fixed.
Again my website is www.vicksburgsoccer.com I reposted it b/c of the above compliment. I really like gallery over copermine. That's why i'm tring hard to get this random box to work.
I'm working on an alumni php page for my site where past people can put where they used to play with some info like years and email in a db. I'm not saying i'll ever get it working correctly. But if anyone else has ever seen a block like that .. please give me a msg or something, so i can have a template to view.
I got my fingers crossed on the gallery. I appreciate you guys working so hard on this for everyone. thx. from me. |
|
| Back to top |
|
|
slackbladder
Moderator


Joined: Mar 29, 2003 Posts: 1038 Location: Cambs,UK
|
Posted: Mon Aug 11, 2003 2:08 pm Post subject: Re: Can some plz take a look at random block |
|
|
Hi,
Add this:
Code: › $count = floatval($count);
in front of:
$choose = rand(1, $count);
in your random_support.php (around line 196) |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Mon Aug 11, 2003 2:10 pm Post subject: Re: Can some plz take a look at random block |
|
|
good one
i had that problem a while ago, had fixed it (with your solution), but then in the muck of things, the old block file got overwritten, and i never ran into the problem again (thus i couldn't dig up the fix). i don't know why it sometimes returns a string and other times a valid float/int/whatever that's needed... |
|
| Back to top |
|
|
bopile
Beginner


Joined: Jul 30, 2003 Posts: 5
|
Posted: Mon Aug 11, 2003 5:48 pm Post subject: |
|
|
thx. slackbladder.. that seemed to fix this of rand() to long error problem... again.. i hope it does'nt come back
Also on the alumni php note..... I found a php/mysql code and just fixed the html to fit my site. It's not a true block.. but it works... as a page within a module.
Thx again for all that has worked on gallery. keep up the good work and thx for the replies to my questions. |
|
| Back to top |
|
|
|
|
|
|
|