Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to update REGISTER_GLOBALS ON

Discussion in 'General Discussion' started by sheriffonline, Nov 29, 2006.

  1. sheriffonline

    sheriffonline Registered

    Joined:
    Nov 29, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    151
    Hello,

    I am new one using WHM cpanel. Please support me that how to Switch REGISTER_GLOBALS ON from REGISTER_GLOBALS OFF from my server WHM Cpanel.

    Thankx
    Sheriff
     
  2. HelloAdam

    HelloAdam Well-Known Member

    Joined:
    Nov 6, 2005
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    166
    Hey,

    You would have to edit your PHP.ini file, which is located in


    /usr/local/Zend/etc/
    (guessing you have Zend installed)

    PM if you would like for me to do this for a small fee...

    From,
    Adam
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    4
    Trophy Points:
    193
    Location:
    Minneapolis, MN
    Usin your favorite Unix editor, view /usr/lib/php.ini
    and change register_globals = Off to register_globals = On
    Then restart apache
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. carluk

    carluk Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    162
    Likes Received:
    0
    Trophy Points:
    166
    Fastest way to find your php.ini location is to do this:
    Code:
    php -i | grep php.ini
    
    You'll get an output like:
    Configuration File (php.ini) Path => /usr/local/Zend/etc/php.ini

    Thus your php.ini is /usr/local/Zend/etc/php.ini

    Then:
    Code:
    pico -w /usr/local/Zend/etc/php.ini
    
    Press CTRL and W and enter "register_globals ="
    Changing the text under the comment block of text from:
    register_globals = Off
    to
    register_globals = On

    Then CTRL and X to exit and hit Y when asked to save. Then you need to restart httpd assuming your using php as module.

    Code:
    /scripts/restartsrv_httpd
    
    It should be noted register globals isn't a good idea to have enabled and is completely removed in php 6.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. jlindenbaum

    jlindenbaum Member

    Joined:
    Mar 29, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    151
    If I were you, I wouldn't do that.

    register_globals is going to be deleted in PHP 6.
    And basically it's bad coding. If you use auto global variables, you're not understanding the concept of $_POST and $_GET and other system variables.

    If you're trying to install osCommerce for a customer. Tell him to use a different shop.

    Register_globals is a security breach.

    I advise you to leave it set to default off. Your customer can change register_globals setting on runtime by creating a .htaccess and entering:

    php_flag register_globals 1


    Again, I advise you to leave register_globals set to 0 or Off.
    http://ca.php.net/register_globals - Read. Even PHP admits register_globals is misused for code injections.

    Regards,
    Johannes Lindenbaum
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I agree, not to mention the security issues that frequently arise from this (hence it's deprecated).
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice