[thelist] Basic PHP question about: 'Notice: Undefined variable'

der wert derwert at hotmail.com
Thu Aug 10 14:14:08 CDT 2006


I just realized the reason they did this, in PHP there is a configuration 
option called registered globals[1], it makes it so that any GET, POST, 
COOKIE, SERVER[2] variables are inherited into the global spec, having 
registered globals enabled is a bad thing, my best guess is they moved from 
a host that had it enabled to one that has it disabled, this means that if 
that was the only error they recieved and it still appears to work 
correctly, they got lucky, if things don't work as expected then some more 
variables may need to be changed to the correct format. programmers who make 
their scripts to use the feature of registered globals are lazy and that 
technique should not be used


[1] http://www.php.net/manual/en/security.globals.php
[2] http://www.php.net/manual/en/reserved.variables.php

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




More information about the thelist mailing list