[CLUE-Tech] PHP - register_globals and htaccess

Sean LeBlanc seanleblanc at americanisp.net
Thu Jan 16 07:01:23 MST 2003


On 01-15 22:02, Jed S. Baer wrote:
> Hi Folks.
> 
> Having dutifully rtFm, I have concluded that if I create an .htaccess file
> in a directory:
> 
> <IfModule libphp4.c>
>   php_flag register_globals on
> </IfModule>
> 
> (I also tried php_value register_globals 1.)
> 
> It should work. Noting that the FM sorta implies that it works if you're
> using mod_php, but doesn't address whether it matter if you're using it as
> an APXS module.
> 
> AFAICT (using <?php phpinfo(); ?>, it doesn't work. Any thoughts?

Does it work if you put it into httpd.conf? Do constructs using the above,
but with different directives inside the if, work? Or is it just
register_globals that is not getting set? 

I have this in my httpd.conf, and AFAIK, it works for what it's calling:

<IfModule mod_dir.c>
    <IfModule mod_php3.c>
        <IfModule mod_php4.c>
            DirectoryIndex index.php index.php3 index.html
        </IfModule>
        <IfModule !mod_php4.c>
            DirectoryIndex index.php3 index.html
        </IfModule>
    </IfModule>
    <IfModule !mod_php3.c>
        <IfModule mod_php4.c>
            DirectoryIndex index.php index.html
        </IfModule>
        <IfModule !mod_php4.c>
            DirectoryIndex index.html
        </IfModule>
    </IfModule>
</IfModule>

Cheers,

-- 
Sean LeBlanc:seanleblanc at americanisp.net  
http://users.americanisp.net/~seanleblanc/
Get MLAC at: http://sourceforge.net/projects/mlac/
When you see a light at the end of the tunnel, make sure it does not get any 
brighter. It could just be the headlight of an oncoming train. 



More information about the clue-tech mailing list