Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 11:09 am EST
Geeklog Forums
Plan on removing dependency of "register_globals"
Status: offline
ronack
Forum User
Full Member
Registered: 05/27/03
Posts: 612
There is a work around for register_globals being off. I don't now how well this works.
// 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);
}
?>
Text Formatted Code
<?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);
}
?>
8
8
Quote
Status: offline
rich0
Forum User
Newbie
Registered: 03/05/05
Posts: 1
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...
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...
8
9
Quote
All times are EST. The time is now 11:09 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content