I have a question regarding an error message that I got when I installed the random photo block and the fix that you recommend.
You state
Quote: › Here are some errors you may receive (These are not errors associated with the random block code, but the backwards compatibility of Gallery with older versions of PHP and PHPNuke.):
If you get complaints about invalid arguments for the "foreach()" method in session.php, make the following replacements on/around the line that registers the complaint:
$_HTTP_SESSION_VARS ==> $_SESSION
This is an issue with newer versions of PHP and how it handles global variables. Gallery is written to be backwards compatible with older versions of PHP.
and here is the warning I got
Code: › Warning: Invalid argument supplied for foreach() in /home/myusername/public_html/modules/gallery/session.php on line 55
So I opened up sessions.php and found the following code around line 55
Code: › Line 53: /* emulate register_globals for sessions */
Line 54: if (!$gallery->register_globals) {
Line 55: foreach($HTTP_SESSION_VARS as $key => $value) {
Line 56: eval("\$$key = & \$HTTP_SESSION_VARS[\"$key\"];");
Line 57: }
Line 58: }
My question is this:Quote: › Do I only replace the $HTTP_SESSION_VARS in Line 55, or should I replace it in both line 55 and 56?