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.

  • 494 Users Found This Useful

Was this answer helpful?

Related Articles

Could not connect to the MariaDB - MySQL database

The error message "Could not connect to the MariaDB" can occur for a number of reasons. Some of...

HTTP Authentication error in PHP

A HTTP Authentication error in PHP occurs when the user is not authorized to access the requested...

PHP information

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

What is the Path to ImageMagick?

The path to ImageMagick on Ultra Web Hosting is /usr/bin/. This means that you can access...

InnoDB Error Attempted to open a previously opened tablespace

When receiving the error... "InnoDB: Error: Attempted to open a previously opened tablespace....