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

What port is MariaDB - MySQL on?

MariaDB and MySQL, two popular open-source relational database management systems (RDBMS), use...

The MySQL server is currently offline admin bin Cpanel/cpmysql/DBCACHE: exit 11

The error message...  The MySQL server is currently offline admin bin Cpanel/cpmysql/DBCACHE:...

When trying to connect to MariaDB or MySQL you receive error 2003 Cannot connect to MySQL on xxxxxx on port 3306 10060

The error 2003 "Cannot connect to MySQL on xxxxxx on port 3306 10060" means that the MySQL...

Useful CSV to MySQL Script

The link below is a great tool we have run into for converting CSV files into MySQL format:CSV to...

How can I find my MariaDB - MySQL version?

Method 1: Through cPanel   Log in to your Ultra Web Hosting account. Click on the cPanel...