The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how can i change the register_globle

Discussion in 'General Discussion' started by RGroup, Jul 25, 2007.

  1. RGroup

    RGroup Member

    Joined:
    Oct 11, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    hi there ,

    am new in web host managing , and i need to know how to change the register_globle for one of my websites and is making register_globle ON better or making it OFF !! cause i don't know the different between making it ON or OFF ... :confused:


    thankx
     
  2. jandafields

    jandafields Well-Known Member

    Joined:
    May 6, 2004
    Messages:
    426
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Do your websites even use php? If not, this is a moot point. Also, why do you want to change this setting for just one of your websites if you have no idea what is does?

    For security reasons, OFF is better, but ON is not necessarily insecure. It all depends on how the php pages are coded. If your pages are html only, this does not affect it at all.

    To change it for just one account:

    Put this is the .htaccess file in your website folder if not using phpsuexec:
    php_flag register_globals on (or off)

    If using phpsuexec, put this into php.ini in your website folder:
    Put register_globals=on (or off)

    Of course, your host may have disabled your ability to change settings like that. Just try it and see.
     
  3. RGroup

    RGroup Member

    Joined:
    Oct 11, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    well , the website is using an PHP script. and wen the user try to logoin the program the browser goes to the login page but it says : You're not Logged in. and the problem was that no variables were taken from the login form ...

    so to make the script work , what is the changes that i need to do in the script ?! :confused:

    and thankx ;)
     
  4. jandafields

    jandafields Well-Known Member

    Joined:
    May 6, 2004
    Messages:
    426
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Then obviously there is a error in the code.

    The html form should have an action=something.php and method=POST
    and input name=user and input name=pass

    In something.php, the variables are $_POST['user'] and $_POST['pass']

    Using this, it won't matter is globals are on or off.
     
  5. RGroup

    RGroup Member

    Joined:
    Oct 11, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1


    well , the code is working very well on another server ... but i've found somthing like what you told me to do , so thankx to you man now i know what to do ...

    have a nice day :)
     
Loading...

Share This Page