Posted on: 02/07/05 08:44am
By: ipqw
Is there a plan on removing the GL depency of register_globals in php.ini? This dependency is quite inconvenient as many hosts view this as a security risk :-/
Best regards,
Kristian.
Plan on removing dependency of "register_globals"
Posted on: 02/07/05 11:36am
By: ronack
There is a work around for register_globals being off. I don't now how well this works.
<?php
// Emulate register_globals on
if (!ini_get('register_globals')) {
$superglobals = array($_SERVER, $_ENV,
$_FILES, $_COOKIE, $_POST, $_GET);
if (isset($_SESSION)) {
array_unshift($superglobals, $_SESSION);
}
foreach ($superglobals as $superglobal) {
extract($superglobal, EXTR_SKIP);
}
ini_set('register_globals', true);
}
?>
Plan on removing dependency of "register_globals"
Posted on: 03/05/05 08:19am
By: rich0
Where does this code get posted? In some particular file, or in every file?
Alternatively, is there any way to get apache to set register_globals for geeklog but not for any other locations on the website? I'm willing to trust that geeklog has its ducks in a row, but I doubt that the same is true for every single other PHP application on my website...
Plan on removing dependency of "register_globals"
Posted on: 03/05/05 09:14am
By: knuff
Just put it in your .htaccess file if you don“t want to enable it for all your sites.
The FAQ[*1]
Greetz,
Boris