Lester,

On Thu, Aug 2, 2012 at 8:49 AM, Lester Caine <les...@lsces.co.uk> wrote:

> rich gray wrote:
>
>> OK
>>>
>>> No discussions on why register_globals has been removed we all
>>> understand why
>>> and now have to live with that ... I'm not winging here!
>>>
>>> The question is "Does anybody have an 'elegant' fix to quickly update a
>>> legacy
>>> site that relies on globals to pass variables between page views?"
>>> My original quick thought was simply to remap these variables as
>>> $_SESSION['var'] so as not to get too deeply into the code base. I've
>>> used
>>> that in a few quick fixes, but I'm not sure that it is acceptable? I
>>> have been
>>> passing the variables via $_REQUEST but that obviously needs a lot more
>>> work
>>> in the html generated, so the session approach would seem better? But
>>> needs to
>>> observe the European rules on use of cookies :(
>>>
>>> I'm thinking that what is needed is a sort of PEAR package that would
>>> simply
>>> be added to every page and be provided with a list of variables to
>>> manage, so
>>> all we need to do is scan the site for variables and establish which
>>> need to
>>> be remembered. I've got all sorts of stuff from google/bing searches,
>>> but I'm
>>> obviously not yet asking the right question ;) Has anybody already been
>>> down
>>> that track?
>>>
>>>  IMO - this should be posted on PHP general not internals -- have you
>> tried
>> extract() ?
>> http://fr2.php.net/extract
>>
>
> I'm specifically asking in relation to helping users migrate from PHP5.2
> ... trying to expand the documentation of making that process easier.
> Pointing at a single manual page is a good example of why we need a more
> consistent support for all those users who are not as computer literate as
> we would like. That function may be a useful element of solving the
> problem, but it does not answer the specific question asked?


Register_Globals has been seen (and touted) as bad practice since the 4.2.
It was disabled by default as of Feb-5-2002, and in 4.2.0. This is a
problem that the vast majority of users solved years ago. If you were still
using them in 5.2 a decade later, you've got other problems.

The documentation exists. The blog posts exist. But they are old, because
this is an old problem. I don't think internals should worry themselves
with it. Especially since 5.2 has been EOL for a while now. If you brought
this up when 5.3 was being planned, perhaps. But at this point, it's either
a general list issue, or MAYBE a docs list issue, but not an internals list
issue...

But I don't think it's an issue at all. Just my $0.02...

Anthony

Reply via email to