How do I enable register_globals (PHP)?

Since version 4.2.0 of PHP, the register_globals setting has been disabled by default on all new installations. As all our servers run a standard PHP installation, it is disabled.


However, if you are still using a software package that requires the setting to be enabled, (for example osCommerce), then there are two ways to enable it on your account.


Via .htaccess


For further information about .htaccess files and how they work, take a look at the following article:

How do .htaccess files work in Plesk?


The normal method is to use a .htaccess file to change the PHP settings via the php_flag directive:


php_flag register_globals on

Just create the file .htaccess with the above contents in the directory where you are going to install the application (or in the root of the domain if you want it to take affect over the whole domain). To switch if off, either change on to off or remove the line or file.


Via Technical Support


If you're unsure about working with .htaccess files, and would like us to help, you can Submit a Ticket to our Support Team. We can either create the .htaccess file for you, or edit your domain's master Apache configuration file (the httpd.include file) which will switch the setting to on by default for the whole domain (although not any sub-domains - each one must be enabled separately).


Note


Please remember that enabling register_globals in PHP is an extra security risk for programs/code that don't properly check the contents (or scope) of a variable before using it. For further details on the setting and the security risks it poses, please see PHP: Using Register Globals in the PHP documentation.

  • 123 Users Found This Useful
Was this answer helpful?

Related Articles

Where is the perl interpreter (or program) located?

If you are running a script via the command line (and you have SSH access enabled), or you are...

Why does my script fail to run in the cgi-bin?

There are a number of reasons as to why you cannot get a script to run in your cgi-bin. They...

Can I install programs such as phpBB and Mambo?

All our accounts provide access to a wide-range of languages and utilities Using these, you are...

How do I enable register_globals (PHP)?

Since version 4.2.0 of PHP, the register_globals setting has been disabled by default on all new...

What is my Web Root or Document Root?

Some scripts/programs may ask you for your web root (or document root) when performing the...