Re: locally enabling register_globals?

From: Date: Sat, 04 Jan 2003 01:15:56 +0000
Subject: Re: locally enabling register_globals?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-130189@lists.php.net to get a copy of this message
Well, I have this in my .htaccess file, so it SHOULD work, but this will depend if your host allows things to changed via .htaccess. <IfModule mod_php4.c> php_flag register_globals on </IfModule> You can place this in your root directory, and it will work for your whole site, or place it further down the file hierarchy to only work from a certain directory down. Once you've done that, I'd recommend doing the OPPOSITE on your local test server: <IfModule mod_php4.c> php_flag register_globals off </IfModule> And spending some time updating your scripts and libraries to suit the "new" way -- I had heaps of stuff that didn't work, updated it all, and I really do prefer the "new" way, because I know where every var comes from. Justin on 04/01/03 11:50 AM, Michael Greenspon (mcg@sequin.com) wrote: > Our hosting provider installed PHP 4.2 and thus disabled > register_globals by default which our scripts depend on. We don't have > access to php.ini to change this. This is with Apache. I tried putting > > php_flags register_globals on > > into .htaccess in the directory(s) with pages that need this but it does > not seem to work. How can I enable register_globals selectively for some > directories of pages so that our old scripts work again? > > Thanks > Michael

« previous php.general (#130189) next »