Page 1 of 3 123 LastLast
Results 1 to 15 of 32

Thread: register_globals On

  1. #1
    Member
    Join Date
    Jan 2005
    Posts
    76

    Default register_globals On

    Hello
    how can I make register_globals On for individual user? I don't want to switch it on on server.

  2. #2
    Member
    Join Date
    Jul 2004
    Posts
    533

    Default

    Go to the directory where your clients php scripts are. Then create a new file called php.ini
    Then edit that file and put this line in it:
    register_globals = On

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    Quote Originally Posted by rip_curl
    how can I make register_globals On for individual user? I don't want to switch it on on server.
    For security purposes, some people might disagree with me, but if I were you, I wouldn't switch register_globals ON. I'll keep them OFF.

    To learn more about register_globals, to share your thoughts and read others comments, go to: http://us3.php.net/register_globals
    Andy Reed
    CCNA, RHCE, and Ubuntu Technologist
    ServerTune.com

  4. #4
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    I'd agree with Andy here - for security reasons, it is strongly advisable to keep register_globals off, even if a client wants it turned on.

    If the answer is to turn register_globals on, you're asking the wrong questions. To be more specific, alternative solutions exist and one that reduces security should not be considered.

  5. #5
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,075

    Default

    Anyone knows which are the security problems of register_globals on when safe_mode is on ?

    In each case I don't think very useful to turn off register_globals off because it can be set to on using .htaccess .

    (the good point is that php 6 has deprecated register_globals on from source code ,
    so with php6 register_globals will be definitely off)
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

  6. #6
    BANNED
    Join Date
    Jul 2005
    Posts
    537

    Default

    Quote Originally Posted by webignition
    I'd agree with Andy here - for security reasons, it is strongly advisable to keep register_globals off, even if a client wants it turned on.

    If the answer is to turn register_globals on, you're asking the wrong questions. To be more specific, alternative solutions exist and one that reduces security should not be considered.
    You may agree with Andy Reed but that depends on your user needs, whether you have phpsuexec installed or if your running Fantastico in which case haveing register globals OFF is not an option. Mediocure hosts that do nothing but host .html pages can get by with this setting being OFF. Competative hosts such as what we have would find users screaming and moving elsewhere to get what they want in order to be able to run their applications. In our case, this is not an option to have it OFF.

    Pats on the back to Andy Reed. I completely disagree with his suggestion. Of course it makes the box more secure and there is no denying that, but thats beside the point. We want to make our users happy and there are other avenues to follow in making sure that your box is not compromised.
    Last edited by jackie46; 05-13-2006 at 02:14 AM.

  7. #7
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    Quote Originally Posted by jackie46
    Competative hosts such as what we have would find users screaming and moving elsewhere to get what they want in order to be able to run their applications. In our case, this is not an option to have it OFF..
    Only because users don't understand or don't care about the security issues related to having register_globals on. And if you think that turning register_globals on just because a user insists then you don't understand the issues either.

    register_globals really does nothing much more than allow $_POST['postvar'] and $_GET['getvar'] to be accessed directly as $postvar and $getvar without having to first declare or define them. This is something that can easily be worked around or simulated.

    register_globals never needs to be on. Simply replacing all instances of $postvar with $_POST['postvar'] and $getvar with $_GET['getvar'] would sort things out.

    If this is really too much of a problem, the following code will register_globalify $_POST and $_GET:

    Code:
    foreach($_POST AS $key => $value) { ${$key} = $value; }
    foreach($_GET AS $key => $value) { ${$key} = $value; }
    Furthermore, register_globals will no longer be an option as of PHP6. Rather than panic over it when the time arises, it's just better to phase it out now.

    On a more positive note (after re-reading my post it might seem a little harsh, which is not my intent), if a user insists on having register_globals turned on, explain the security-based reasons why this is not an option and put forward alternatives for working around the problem or simulating the behaviour of register_globals. If you have to, be blunt and point out that they can have security and reliability or a given script and ask them what they consider to be more important.

    I also try my best, when possible, to find patches and/or newer versions of scripts that are no longer dependent on register_globals. A patch exists for oscommerce, for example. Users that insist that register_globals is turned on are, admittedly, not happy that I won't allow it however the fact that I will do as much as possible to make things work with register_globals turned off seems to alleviate any unhappiness.

    I would also find it hard to trust in the abilities of a PHP developer if they insisted that either their script must have register_globals on to function or insist that it is impossible to change the script so that it is no longer dependent on register_globals. It's not that tricky and any competent developer would have no problems.

  8. #8
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    Quote Originally Posted by webignition
    Only because users don't understand or don't care about the security issues related to having register_globals on. And if you think that turning register_globals on just because a user insists then you don't understand the issues either.
    Very well said, webignition.
    Andy Reed
    CCNA, RHCE, and Ubuntu Technologist
    ServerTune.com

  9. #9
    Member
    Join Date
    May 2003
    Posts
    67

    Default

    This is nice discussion. I understand the philosophy debate and the declarations from PHP about register_globals.

    Regardless, I would still like an answer to the original question. I have a single customer who has an application that will be time consuming to upgrade. While the patches are installed, I would like to "buy some time" by allowing register globals on only that one single account - without allowing them on the server-wide php.ini.

    I'm running php 4.3.3 and php 5.1.4 with phpsuexec. I've noticed the php_flag arguments in .htaccess do not work. And I've tried putting the php.ini file in the hosting directory and that also does not work. php_admin_flag in the httpd.conf configuration for the virtual host also does not work.

    Can someone explain what I am missing or how to implement register_globals on a single account in the phpsuexec environment?

  10. #10
    nat
    nat is offline
    Member
    Join Date
    Jan 2003
    Posts
    210

    Default

    Just upgraded to PHP Version 5.1.4 with phpsuexec and placing register_globals = On in a php.ini file is no longer turning it on.

    A phpinfo file in the same directory as the php.ini file still shows it off for both the local value and master value.

    Can some with 5.1.4 phpsuexec try it for a second to see if it works or if i'm nuts.

  11. #11
    Member
    Join Date
    Dec 2003
    Posts
    124

    Default

    Quote Originally Posted by nat
    Just upgraded to PHP Version 5.1.4 with phpsuexec and placing register_globals = On in a php.ini file is no longer turning it on.

    A phpinfo file in the same directory as the php.ini file still shows it off for both the local value and master value.

    Can some with 5.1.4 phpsuexec try it for a second to see if it works or if i'm nuts.
    Yes, I have the same problem.

  12. #12
    Secret Agent
    Guest

    Default

    Same here, how do we use register globals on in htaccess when phpsuexec support is enabled?

  13. #13
    Member
    Join Date
    Apr 2003
    Location
    New Jersey, USA
    Posts
    414

    Default

    Same issue here. Anyone have a fix or work around?
    eMax Hosting, LLC - Providing Reliable Hosting Services for the past 3 years
    ¨€ cPanel, MySQL, 24/7 Support, Money Back Guarantee, *Free Website Builder*,
    ¨€ Shared Hosting, Reseller Hosting, Dedicated Management, Site Monitoring Services, 97% Client Rating
    ¨€ Have a Sales Questions? Call us toll free at 1-800-770-eMax!

  14. #14
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    I still think that enabling register_globals just to get a script working is about as sensible as replacing the wheels on your car with large round cheeses just to get your sound system to work.

    Surely if people chose not to use large round cheeses on their axles, companies would soon stop developing sound systems dependent on such large round cheeses.

  15. #15
    Member
    Join Date
    Apr 2003
    Location
    New Jersey, USA
    Posts
    414

    Default

    Quote Originally Posted by webignition
    I still think that enabling register_globals just to get a script working is about as sensible as replacing the wheels on your car with large round cheeses just to get your sound system to work.

    Surely if people chose not to use large round cheeses on their axles, companies would soon stop developing sound systems dependent on such large round cheeses.
    Since you seem to be full of wisdom (and humor if I might add) could you enlighten me with your vocal point when dealing with multiple clients regarding their scripts and not working?


    eMax Hosting, LLC - Providing Reliable Hosting Services for the past 3 years
    ¨€ cPanel, MySQL, 24/7 Support, Money Back Guarantee, *Free Website Builder*,
    ¨€ Shared Hosting, Reseller Hosting, Dedicated Management, Site Monitoring Services, 97% Client Rating
    ¨€ Have a Sales Questions? Call us toll free at 1-800-770-eMax!

Page 1 of 3 123 LastLast

Similar Threads

  1. on/off register_globals
    By arturoz in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 04-01-2009, 03:12 AM
  2. register_globals on or off ??
    By ctbhost in forum cPanel & WHM Discussions
    Replies: 7
    Last Post: 08-18-2008, 10:53 AM
  3. Can't enable register_globals
    By xxkylexx in forum cPanel & WHM Discussions
    Replies: 22
    Last Post: 08-31-2007, 04:24 PM
  4. register_globals
    By bh2006 in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 06-20-2006, 07:35 AM
  5. register_globals help please
    By shann in forum cPanel & WHM Discussions
    Replies: 9
    Last Post: 08-10-2005, 11:35 AM