Register Globals=Off Not Working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • snowdonkey
    New Member
    • Aug 2006
    • 37

    Register Globals=Off Not Working

    Hey. I recently upgraded my Windows XP machine to PHP 5.2.0 and Apache to 2.2.3. I just realized that my scripts are able to use variables passed through via URL without using $_REQUEST[] to receive them.

    I've made sure I have register_global s = Off in my php.ini file. Changing the error_reporting to E_STRICT didn't give me any feedback either. I also browsed the PHP 5 update logs but didn't see anything there.

    Any ideas on how I can fix this? Anyone else experiencing the same thing? This could just be an update with the new PHP version but I doubt it . . .

    Thanks!
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Originally posted by snowdonkey
    Hey. I recently upgraded my Windows XP machine to PHP 5.2.0 and Apache to 2.2.3. I just realized that my scripts are able to use variables passed through via URL without using $_REQUEST[] to receive them.

    I've made sure I have register_global s = Off in my php.ini file. Changing the error_reporting to E_STRICT didn't give me any feedback either. I also browsed the PHP 5 update logs but didn't see anything there.

    Any ideas on how I can fix this? Anyone else experiencing the same thing? This could just be an update with the new PHP version but I doubt it . . .

    Thanks!
    If it works as you say, what is your problem? I only wonder how you get your variables passed in the url without using the $_GET array.

    Ronald :cool:

    Comment

    • snowdonkey
      New Member
      • Aug 2006
      • 37

      #3
      I've always just used $_REQUEST array (which encompasses $_POST, $_GET, $_SESSION, and $_COOKIE) to get my variables passed through URL. If I have register_global s off than I should have had to use $_GET or $_REQUEST or else my script should've failed, but I alas, I fixed it.

      Apparently the newest version of PHP turns display_errors= off as default, different than error_reporting . So even though technically there were errors, none were shown, and my script was allowed to work anyway. Thanks for the response ronverdonk.

      Comment

      • snowdonkey
        New Member
        • Aug 2006
        • 37

        #4
        Sorry, nevermind that business about $_REQUEST replaceable for $_GET, $_POST, etc. But I have always used it successfully for receiving variables through URL.

        Comment

        • ronverdonk
          Recognized Expert Specialist
          • Jul 2006
          • 4259

          #5
          Glad you found it. I always learn.

          Ronald :cool:

          Comment

          Working...