Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 7 of 7

This is a discussion on register_globals in the VPS & Dedicated forum
A script i have requires register globals to be turned on does anyone know what i have to do to turn it on ...the message ...

  1. #1
    JPC Member
    Join Date
    Mar 2006
    Posts
    6

    register_globals

    A script i have requires register globals to be turned on does anyone know what i have to do to turn it on ...the message i got was:
    HTTPAuth Requires "register_globals" to be ON
    so im just curious on how to get my script working. Also sry if i posted in the wrong section.

  2. #2
    JPC Guru
    Join Date
    Jan 2004
    Location
    I'm right behind you....
    Posts
    389
    Um... if the script requires register_globals to be on, then it's probably not a very good script in the first place. Most people here are gonna jump all over you telling you that register_globals ON = "the devil himself!"

    Ah, but anyway... Assuming you're on a VPS (and that you did post this in the right forum ), I don't think you're affected by the changes Jag is making to php on their servers. In which case, you just make sure the script is in its own directory and put an .htaccess file in that directory with the following in it:

    Code:
    php_flag register_globals on
    Again, when others reply they'll tell you it's a bad idea (and they're right) and they'll yell at me for telling you to do it (and they'll be right), but there you have it.

  3. #3
    JPC Member
    Join Date
    Mar 2006
    Posts
    6
    hmm its more of an extra feature of a script to further secure it so a login screen pops up before you can access it. before another one to get into the admin panel of a cms. (PHP nuke btw)

  4. #4
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Um... running PHP-Nuke with globals on is NOT a good idea! I suggest you try try something like...

    http://www.lenon.com/admin.php
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  5. #5
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Quote Originally Posted by Galen
    Again, when others reply they'll tell you it's a bad idea (and they're right) and they'll yell at me for telling you to do it (and they'll be right), but there you have it.
    Smarty pants!
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  6. #6
    Voltron wannabe tank's Avatar
    Join Date
    Apr 2004
    Location
    Houston
    Posts
    306
    Adding Register Globals On to increase security? Sounds like an oxymoron. I wouldn't go as far as to tell you that you "must" do anything. But what I would suggest is to research what turnign it on does, in general.

  7. #7
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Not knowing how your script is written and how it is called, it is hard to make suggestions, but maybe this will help...

    Is this script something that is called directly from a URL (or by a form submission)? If so, is it or can it be run from its own directory (instead of public_html). For example, can it be called from www.somesite.com/myscript/myscript.php instead of www.somesite.com/myscript.php? If so, you can add a .htaccess file to the "myscript" directory that turns on register_globals for that directory only. Then that script can run with register_globals on while the rest of your site has them off.

    Option B: if you have an expeirience with PHP it usually isn't too difficult to modify a script to make it work with globals off, provided it isn't too complex. Just look at what kinds of variables are bassed in to the script and add a block of code that the top such as:

    PHP Code:
        $var1 $_POST['var1'];
        
    $var2 $_POST['var2'];
        
    $var3 $_POST['var3']; 
    In this example, each the $_POST variables represent values from a form. Each line declares a the varibale that would have been automatically declared if register_globals was on, but you gain the security of having it off because only those variables that you specify will be declared.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •