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 ([EMAIL PROTECTED]) 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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to