Register Globals on PHP

Page Views: 2,214
0 (0 Ratings)
Register Globals on PHP

Due to the security risk presented by having Register Globals set to ON we have set the default to off on our hosting. This may affect some older PHP scripts you have installed on your server. We strongly encourage you to upgrade your scripts to a version that runs without Register Globals enabled. If you are unable to find a newer version of your script that allows this, you can add a file called php.ini that contains the following:

register_globals = On

So, you will create a text file in notepad or any other text editor, type in the line register_globals = On then upload that file via FTP to the directory that contains your php files. You may need to include a copy of this file in subdirectories as well.

Alternately, you can paste a snippet of code on the top of each of your php files that requires a global variable. Just paste the following:

At the top of each php file.