PHP programming language provides you a simple way to define functions and variables. The concept of PHP variables is complex in ensemble, but for start let's say that variables used inside PHP code begin with the $ sign and do not need to be initialised.
You must make the difference between older versions of PHP, when variables had a global character and the newest PHP versions in which variables are super globals.
For example, older PHP scripts, made before the apparition of PHP 4.2 version are not using super global definition of variables and as a consequence they will not work on the new versions of PHP, because the default setting in PHP configuration file (PHP.ini) is register_globals off.
You should not be surprised that when you test an older script you cannot run it, but it is a solution for this problem: turn register_globals on in php.ini by modifying the appropriate line. If you use an online webserver, then this setting is not recommended from security reasons.
If you are a PHP coder and use old PHP templates, you should consider rewriting them in order to be compatible with actual Apache and PHP distributions. You can check the script requirements to see if it requires the register_globals to be on. Depending on the webhosting service, there are still situations when register_globals is enabled in php.ini file.
If you do not have access to the server configuration files you can add a .htaccess file to the root directory of your PHP script in order to be able to use scripts that require register_globals on. The .htaccess file must contain the line