PHP Register Globals: Difference between revisions

From Edgar BV Wiki
Jump to navigation Jump to search
New page: In order to turn the php_flag register_globals off in apache there are a few ways to go about it: 1) Use a .htaccess file In order for this to work, apache needs to be told that the .hta...
 
No edit summary
 
Line 5: Line 5:
In order for this to work, apache needs to be told that the .htaccess file in the directory is allowed to override the options
In order for this to work, apache needs to be told that the .htaccess file in the directory is allowed to override the options


<pre>
<Directory /where/the/site/is/>
<Directory /where/the/site/is/>
   AllowOverride Options
   AllowOverride Options
</Directory>
</Directory>
</pre>


(NB The path must not include any symbolic links).
(NB The path must not include any symbolic links).
Line 22: Line 24:


2) Configure a Directory operative in apache
2) Configure a Directory operative in apache
 
<pre>
<Directory /where/the/site/is/>
<Directory /where/the/site/is/>
         php_flag register_globals on
         php_flag register_globals on
</Directory>
</Directory>
</pre>

Latest revision as of 13:44, 29 October 2007

In order to turn the php_flag register_globals off in apache there are a few ways to go about it:

1) Use a .htaccess file

In order for this to work, apache needs to be told that the .htaccess file in the directory is allowed to override the options

<Directory /where/the/site/is/>
   AllowOverride Options
</Directory>

(NB The path must not include any symbolic links).

Then in /where/the/site/is/.htaccess

either php_flag register_globals on

or

php_value register_globals 1


2) Configure a Directory operative in apache

<Directory /where/the/site/is/>
        php_flag register_globals on
</Directory>