![]() |
|
|
+ Search |
![]()
|
Jun 26th, 2004 00:17
Philip Olson, Adam Jenkins, Mark Whittemore, Knud van Eeden,
Odds are you unknowingly rely on the PHP directive named register_globals as given the following example: http://www.example.com/a.php?foo=bar The variable $foo will not exist when register_globals is off and it's off by DEFAULT as of PHP 4.2.0 so instead you would use $_GET['foo'] or $_REQUEST['foo'] and all of this is further described in the wonderful PHP manual here: http://www.php.net/variables.external This is also covered in various faqts such as: http://www.faqts.com/knowledge_base/view.phtml/aid/5314/fid/6 http://www.faqts.com/knowledge_base/view.phtml/aid/31/fid/9 To see all configuration information create a file with the following code: <?php phpinfo(); ?> It'll tell you your register_globals setting. Consider modifying your coding habits to not rely on this directive being on. The register_globals directive CANNOT be set at runtime (in your script) but can be set in php.ini or .htaccess