Register Globals On Off

The error message Register Globals On means that the register_globals directive is set to On in your PHP configuration file. This directive controls whether or not PHP will automatically create global variables for the contents of the EGPCS (Environment, GET, POST, Cookie, Server) variables.

 

Having register_globals set to On is a security risk, as it allows attackers to inject malicious code into your PHP scripts. If you receive this error, you should disable the register_globals directive in your PHP configuration file.

 

To disable the register_globals directive, you will need to edit your PHP configuration file. The location of this file will vary depending on your web hosting provider. Once you have found the file, you will need to find the register_globals directive and set its value to Off.

 

For example, if your PHP configuration file is located at /public_html/php.ini, you would add the following line to the file:

register_globals = Off


Once you have disabled the register_globals directive, you will no longer receive the error message Register Globals On.

Here are some additional details about the register_globals directive:

  • The register_globals directive is deprecated in PHP 5.3.0 and removed in PHP 5.4.0.
  • The register_globals directive is enabled by default in PHP 4.2.0 and earlier.
  • The register_globals directive can be disabled by setting its value to Off in the PHP configuration file.

If you run a script that requires php "register globals on" instead, create a php.ini file and include the following:

register_globals = 1

Save the file and upload it to the directory of the script that requires register globals on. If the script requires it in multiple directories you can upload your php.ini to those directories as well.

If that does not function for the script create or modify your .htaccess file to include the following:

php_flag register_globals On

Save the file and upload it to the directory of the script that requires register globals on.

Note: This feature is no longer supported by PHP versions 5.3 and above.

 

Contact Ultra for additional support.

  • 496 Users Found This Useful

Was this answer helpful?

Related Articles

Changing Maximum Upload Size

Firts check your control panel for the "MultiPHP INI Editor" icon. If available you can change...

How do I change my PHP settings?

How do I change my PHP / PHP.INI settings?To change your PHP settings, just login to your hosting...

403 Forbidden error with Drupal after install

There are a few things you can do to fix the 403 Forbidden error with Drupal after install:...

PHP information

To view your current version of PHP you will create a php file, for example info.php, and place...

Warning: Unknown(): open_basedir restriction in effect

Basedir restriction is set for security. This most often occurs when you are calling an app...