PHP - turning register globals off, what is the best way to go about fixing the code?
Posted
by user187809
on Stack Overflow
See other posts from Stack Overflow
or by user187809
Published on 2010-05-09T21:19:40Z
Indexed on
2010/05/09
21:28 UTC
Read the original article
Hit count: 152
php
I am working on a old code base, where programmers assumed that register_globals will always be on. Hence variables are used without $_GET or $_POST prefix, pretty much in every page (the code base is huge, hundreds of scripts). I tried turning it off, but the very first script (login script) goes on an infinite loop.
I understand that going through one script at a time, and one line at a time and fixing the variables is probably the only option (adding the prefix $_GET or $_POST as the case may be). Has anyone does this before? How did you go about doing it? Any advice?
© Stack Overflow or respective owner