OCS Solutions Web Hosting Design and Consulting Web Hosting and Consulting Call Us
OCS Home  |  Wiki Front Page  |  Web Hosting  |  Virtual Dedicated Servers  |  Consulting  |  Support  |  Contact Us

Enabling register globals on Your Site

From OCS Support Wiki

Jump to: navigation, search

Introduction

We have register_globals turned off in PHP on our servers because it is a security risk. Your scripts should use the $_REQUEST['varname'] method for accessing passed variables, not simply $varname which can lead to SQL injection attacks and other types of problems.

Temporary Solution

If you're not sure if your server has PHSuExec or not, you can try the non-SuExec method first to see if it works. If you get an internal server error, remove the .htaccess file or remove the lines you added, then try the second method.

Non-PHPSuExec Systems

You can enable register_globals on your site by creating an .htaccess file with the following contents (or append this to an existing .htaccess file):

php_flag register_globals on

PHPSuExec Systems

On systems with PHPSuExec, you'll need to create a php.ini file in your public_html folder with the following:

register_globals = On

Long Term Solution

It is strongly advised to upgrade your PHP script so that it uses the modern methods to access GET/POST variables.

Personal tools