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

Premature end of script headers

The error message Premature end of script headers means that the PHP script stopped executing...

What is the Path to ImageMagick?

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

I am having problems with a script I wrote

PHP suexec is running on all of our shared servers. If you are running code that is insecure or...

How do I update my version of PHP?

PHP needs to be updated. What do I do?We make changing your version of PHP easy. Simply login to...

Increase PHP Memory

Fatal error: Allowed memory size of xxxxxxxxx bytes exhausted (tried to allocate xxxxxxxx bytes)....