Jump to content

PHP Register Globals Work Around


jj20051

Recommended Posts

Register_globals involved magically populating same name program/post/get/cookie/session variables. Any of the following present in a script - $abc, $_POST['abc'], $_GET['abc'], $_COOKIE['abc'], $_SESSION['abc'] are all cross-populated with the same value when register_globals are on.

 

The fix is to modify your code to convert any use of session_register, session_is_registered, session_unregister... functions to use $_SESSION and change code so that it specifically references the correct $_POST, $_GET, $_COOKIE, $_SESSION, or program variable that it is expecting a value to be in.

 

The hard part in doing this is you need to determine how a variable is being used in any piece of code.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.