Welcome to Geeklog, Anonymous Friday, April 12 2024 @ 10:12 am EDT

Geeklog Forums

Plan on removing dependency of "register_globals"

Status: offline


Forum User
Registered: 02/26/04
Posts: 3
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,

Status: offline


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.
Text Formatted Code
// 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);

Status: offline


Forum User
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...

Status: offline


Forum User
Full Member
Registered: 12/17/04
Posts: 340
Just put it in your .htaccess file if you don´t want to enable it for all your sites.


Vanrillaer.com - our Family Portal

All times are EDT. The time is now 10:12 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