Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: How do I turn off register_globals in .htaccess?


Message #1 by "Datatal AB - Gauffin, Jonas" <jonas@d...> on Thu, 14 Nov 2002 21:44:26 +0100
> How do I turn off register_globals in .htaccess?
>
> Do I need to chmod .htaccess or something afterwards? (im a linux n00b)

Well, if httpd.conf says that .htaccess can override configuration parameters
(see AllowOverride) then all you need to do is add your configuration
directives to .htaccess just like you would in httpd.conf.


http://httpd.apache.org/docs-2.0/mod/core.html#allowoverride

in .htaccess, simply insert this tag block:

<IfModule mod_php4.c>
  php_admin_flag register_globals off
</IfModule>

http://www.php.net/configuration.changes



The .htaccess file must be readable by the webserver, but it doesn't
necessarily have to be world-readable, and no one should be able to write it
except you.


take care,

nik


  Return to Index