[geeklog-devel] Pushing GL1 into regester_globals=off

Blaine Lang langmail at sympatico.ca
Mon Jul 28 14:37:25 EDT 2003


We could also add something like this at the top of each program or  in to
COM_siteHeader

// register_globals cheat code
//HTTP_GET_VARS
while (list($key, $val) = @each($HTTP_GET_VARS)) {
       $GLOBALS[$key] = $val;
}
//HTTP_POST_VARS
while (list($key, $val) = @each($HTTP_POST_VARS)) {
       $GLOBALS[$key] = $val;
}
----- Original Message -----
From: "Tony Bibbs" <tony at tonybibbs.com>
To: <geeklog-devel at lists.geeklog.net>
Sent: Monday, July 28, 2003 2:31 PM
Subject: Re: [geeklog-devel] Pushing GL1 into regester_globals=off


> Well, it's not that easy...well, it is technically easy but it will be a
> lot of work.  For each page you need to figure out which variables are
> registered as globals in the current 1.3.x tree.  Then you need to
> replace them with the $HTTP_POST_VARS or $HTTP_GET_VARS.
>
> We could, as a group, decide to require which ever version of PHP that
> started usin the $_REQUEST object.  The good thing about that is then
> regardless of a POST or a GET you can use the $_REQUEST['<varname>'].
> If we don't want to do that, we *could* simply either ask for the PHP
> version in config.php or check it through the code and if they don't
> support $_REQUEST, then you could add the the top of lib-common.php
> somewhere this:
>
> $_REQUEST = array_merge($HTTP_POST_VARS, $HTTP_GET_VARS);
>
> That way the code regardless of PHP version would be the same.
>
> Make sense?  Comments, questions, concerns?  How much fun would
> regression testing this be?
>
> --Tony
>
> LIMBURG, Mark wrote:
>
> >Howdy
> >
> >I'm thinking of taking this on.  Are there any *good* doco's on how to
> >approach this?  Any key examples that anyone could provide?
> >
> >Regards
> >
> >Mark Limburg
> >
> >Operations Support Team Leader
> >Information Services
> >BAE SYSTEMS Australia
> >
> >
> >_______________________________________________
> >geeklog-devel mailing list
> >geeklog-devel at lists.geeklog.net
> >http://lists.geeklog.net/listinfo/geeklog-devel
> >
> >
>
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://lists.geeklog.net/listinfo/geeklog-devel




More information about the geeklog-devel mailing list