Menu

#3 register_globals and no navigation fix

open
nobody
None
5
2018-11-03
2008-08-22
No

you will get rid of the warning
"Please set the directive 'register_globals' in your php.ini to 'On'"

and fix the navigation on the left

if you edit the very beginning of
include/aperetiv.inc.php

<?php
/* vim: set expandtab shiftwidth=4 softtabstop=4 tabstop=4: */
/* check whether register_globals is on or not */
if(!((bool) ini_get('register_globals'))) {
foreach($_GET as $get_k=>$get_v) $$get_k=$get_v;
}
# on new apache installations everything is stored in $_SERVER, so this is the fix for that:
if (isset($_SERVER)) foreach($_SERVER as $s_k=>$s_v) $$s_k=$s_v;

@session_name('timeeffect');
# ....

Discussion

  • Ruben Barkow-Kuder

    Logged In: YES
    user_id=334647
    Originator: YES

    I forgot the post vars:

    foreach($_POST as $p_k=>$p_v) $$p_k=$p_v;

    so thewhole fix is:
    ----<?php
    /* vim: set expandtab shiftwidth=4 softtabstop=4 tabstop=4: */
    /* check whether register_globals is on or not */
    if(!((bool) ini_get('register_globals'))) {
    foreach($_POST as $p_k=>$p_v) $$p_k=$p_v;
    foreach($_GET as $get_k=>$get_v) $$get_k=$get_v;
    }
    # on new apache installations everything is stored in $_SERVER, so
    this is the fix for that:
    if (isset($_SERVER)) foreach($_SERVER as $s_k=>$s_v) $$s_k=$s_v;

    @session_name('timeeffect');
    # ....-------------------------------------------------------------------

    -----------------------------------------------------------------------

     
  • Ruben Barkow-Kuder

     

Log in to post a comment.