Do I need $_SESSION or is there another way?

dilligaf
dilligaf's picture

Joined: 2003-02-20
Posts: 9
Posted: Thu, 2003-02-20 11:56

I have the random-block installed and it is working but I keep getting the

Warning: Invalid argument supplied for foreach() in
/home2/www/dilligaf/hobbies/Gallery/session.php on line 55 - error.

I changed $HTTP_SESSION_VARS to $_SESSION in both instances and this did not
help as I received the same error message.

Trying everything I know about PHp, which isn't a lot, I finally got it working by
commenting out the part that caused the error.

//if (!$gallery->register_globals) {
//foreach($_SESSION as $key => $value) {
//eval("$$key = & $_SESSION["$key"];");
//}
//}

Now it works but occasionally I have problems when I click on the picture when the
&id= returns as unknown. Is this caused by removing the above or just some flaw that
I'm lucky to have? And do I really need the $_SESSION part for Gallery to work properly
or is there some other way to call it?

I'm using Gallery v1.3.4-cvs-b11 in PHP-Nuke Version 6.0 running in PHP Version 4.0.6

Any help will be appreciated.