Home arrow Tutorials arrow How to enable or disable register_globals via .htaccess

Web Development

Welcome to Web Development section. Please choose a category. 
 
  • Hrvatski tutorijali
    Ovdje su objavljeni razni tutorijali na hrvatskom jeziku na temu PC, programiranje, web development, savjeti, trikovi, optreba racunala itd.
  • Tips / Tricks
    Articles about various tips and tricks concerning Windows, Linux and other OS usage.
  • JavaScripts
    Code snippets, tutorials and tricks for JavaScrip language.
  • PHP & MySQL
    Tutorials, code examples, tips and tricks for PHP and MySQL development.
  • Tutorials
    Place for tutorials about using various application in best and simplest way.
How to enable or disable register_globals via .htaccess PDF Print E-mail
(16 votes)

How to enable or disable register_globals via .htaccess
The most common setting that clients will want to change are the “register_globals” settings. If you want to enable register_globals, you will need to create a .htaccess file in your site’s main directory (or the main directory of your site that contains PHP hosting scripts). Your .htaccess file should contain the following line:

php_flag register_globals on

If you want to disable register_globals then your .htaccess file should contain the following line:

php_flag register_globals off



Here is how to enable register_globals via .htaccess:

1. Create an .htaccess in your virtual host's root directory
2. put the following code in it:

# Override PHP settings. The first IfModule is
# for Apache 1.3, the second for Apache 2.

<IfModule mod_php4.c>
php_value register_globals 1
</IfModule>

<IfModule sapi_apache2.c>
php_value register_globals 1
</IfModule>

php_flag register_globals 1


3. Save the settings
 
< Prev   Next >
What's your favorite Internet browser?
 

Login






Lost Password?

Tools

Coming soon...

Syndicate