What Is register_globals?

Discussion in 'Site & Server Administration' started by gobbly2100, Aug 14, 2007.

  1. #1
    I was just wondering what "register_globals" actually is about? I have a Joomla installation I just did and it is just imforming me that it is turned off.

    What is it and what does it do?
     
    gobbly2100, Aug 14, 2007 IP
  2. Kuldeep1952

    Kuldeep1952 Active Member

    Messages:
    290
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Register_globals is a PHP configuration variable.

    If it is OFF, the Form POST and GET variables can only be accessed
    as the $_POST or $_GET associative array.

    e.g.

    the name field in form will be seen in the action script as

    $_POST['name']

    If it is ON, the name field in form can be accessed
    both as $_POST['name'] or $name.

    For security reasons, the default setting nowadays is that
    it is kept OFF.
     
    Kuldeep1952, Aug 14, 2007 IP
  3. agnivo007

    agnivo007 Peon

    Messages:
    4,290
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    0
    #3
    agnivo007, Aug 15, 2007 IP
  4. stickysnail

    stickysnail Active Member

    Messages:
    335
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Generally you can turn this off in the .htaccess file in your public_html

    But if your hosting is running phpsuexec you may need to have this done in a
    php.ini file

    Really just depends what host you have. Some hosts may not have the option to change this. You may need to ask them to do this for you.

    Keep in mind when this is done a symlink must be added for all files for this to apply to.

    Its better to just ask your hosting provider to help on this.
     
    stickysnail, Aug 15, 2007 IP