[Project_owners] Mozdev.org PHP 5 upgrade; update code for register_globals = off
mycroft.mozdev.org at googlemail.com
Mon Jan 14 08:21:06 PST 2008
Thanks - that makes me feel a bit better.
ouple of clarifications...
On 14/01/2008, Douglas E. Warner <silfreed at silfreed.net> wrote:
> On Saturday 12 January 2008, Mycroft Project wrote:
> > I hope I've got something wrong...
> > I tried the php snippet above in a testing directory which seems to be
> > entirely destructive. Adding:
> > echo $$__v, " | ", $__v, " | ", $__sg, "\n";
> > before the unset() line seems to suggest that a lot of the Mozdev
> > like $page are also scrubbed - I didn't get any output at all from the
> > I was trying to load.
> The snippet I provided probably is too destructive due to mozdev using
> variables a little too liberally. I'll include an updated version below.
> It would probably be better to use Mozdev's defines for accessing the
> page, which would be PAGE (without a dollar sign) (yes, I know this is
> probably undocumented).
I was about to write that I wasn't using $page anywhere then did a search...
I thought it was Mozdev's use that was stopping the page from loading at all
but no longer entirely sure.
> More generally, if I read
> > http://uk.php.net/manual/en/language.variables.predefined.php correctly
> > then $_GET['foo'] is okay (this wasn't what I understood from the
> > message) but $REMOTE_ADDR has to be replaced by $_SERVER['REMOTE_ADDR']
> > also seems to suggest $HTTP_*_VARS is acceptable (though discouraged)
> > the default value of register_long_arrays.
> $HTTP_*_VARS is also deprecated and should be avoided; it has been removed
> PHP 6. In general, only the $_* variables should be used for getting
> data from PHP.
Sure, can you confirm how register_long_arrays will be set initially.
Just a matter of prioritising really.
Mycroft Project Owner
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Project_owners