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

This is a discussion on register_globals on in the VPS & Dedicated forum
I do not know how to turn globals on for certain accounts who need it. I did however find a solution to the problem by ...

  1. #1
    JPC Member zanerzack's Avatar
    Join Date
    Apr 2006
    Posts
    16

    register_globals on

    I do not know how to turn globals on for certain accounts who need it.
    I did however find a solution to the problem by adding this to the
    .htaccess file.
    php_flag register_globals on

    Is that ok to do?
    Or is there a better way.
    Basicly I was having trouble with a php script i was using, It worked fine
    on old host, but now here it didn't. I found the reason to be that globals
    where off, so I added the above to the .htaccess file.
    http://www.pabucks.com

    Outdoorsman Toolbar.
    http://outdoorsman.ourtoolbar.com/

    Totally safe, Totally free and Totally Cool. Built By Outdoorsmen for Outdoorsmen.


  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Changing it in the site's .htaccess file is fine. Another option is to change it in the server's httdp.conf file under the <VirtualHost> directive for the site you wnat to modify. (This is assuming that you're using mod_php and not php-cgi.)

    Putting it in .htaccess means that the site's owner (assuming that's not you) might accidentally delete or edit the .htaccess file and change the setting. Of course, if you put it in httpd.conf, it is still possible for the user to override in .htaccess, but that's more unlikely.

    --Jason

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

  3. #3
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    Register globals on is a really depracated thing to do by now, because it way too easily creates safety holes (see plenty of other threads if you want to read up on that). For that reason, I think the .htaccess solution is the best to use, specifically because you put it so close to the client. Don't pretend for a minute that is standard (by hiding it in the httpd.conf), but sort of "rub his face" into the fact that you had to make this hack to make his obsolete piece of programming work.

    And of course, if this clients runs multiple applications in his space, of which only one or two need the register globals, do put the .htaccess directive only in their specific folders, not account wide. That way you limit the risks a bit - as especially applications that feel it should be OFF anyway might not code with ON in mind - and you can also easily remember what programs it was there for.
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

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
  •