homepage Welcome to WebmasterWorld Guest from 54.197.147.90
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
how to enable register globals
rajeshk98




msg:3144623
 5:52 am on Nov 3, 2006 (gmt 0)

I do not have access to the http configuration file. my site is hosted with a hosting comany and the global varibles do not work.
so by enabling register_globlas will solve my prlblem.
if so how i enable them in .htaccess file.

 

jtara




msg:3145678
 4:36 am on Nov 4, 2006 (gmt 0)

I assume you are referring to PHP?

If they have been disabled in the Apache config file, you can NOT enable them in .htaccess. That's the way PHP security (I know, an oxymoron...) works.

You will have to ask your hosting company if they are willing to turn them on.

mcavic




msg:3145741
 7:06 am on Nov 4, 2006 (gmt 0)

Register_globals is a setting in php.ini, and it should always be turned off. It doesn't prevent global variables from working in general, but rather:


Global variables are no longer registered for input data (POST, GET, cookies, environment and other server variables). Instead of using $foo, you can use $_REQUEST["foo"] (includes any variable that arrives through the request, namely, POST, GET and cookie variables), or (preferably) use one of the specific $_GET["foo"], $_POST["foo"], $_COOKIE["foo"] or $_FILES["foo"], depending on where the input originates.

Note that register_globals ... often leads to security bugs.


jtara




msg:3145974
 4:35 pm on Nov 4, 2006 (gmt 0)

If you are writing your own code, you should do as mcavic has suggested.

If you are trying to get some third-party code to work, you will either have to go in and fix all of the incompatabilities (which could be a BIG pain!) or convince your hosting company to change the setting, as this can't be over-ridden in .htaccess.

Or you might want to consider using a more up-to-date script. :)

jatar_k




msg:3145979
 4:38 pm on Nov 4, 2006 (gmt 0)

this is a good read
[php.net...]

coopster




msg:3148827
 3:54 pm on Nov 7, 2006 (gmt 0)

Actually, you can change this directive in .htaccess if your host allows. The PHP manual page link offered by jatar_k is a must read first. Here is a related thread that might help as well.

[webmasterworld.com...]

However, this particular directive has been deprecated and actually removed in PHP6 so now is the time to correct your code! Relying on this directive is a bad idea.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved