Knowledgebase: Hosting FAQ > CGI and PHP
PHP files are not working! (Register Globals)
Posted by - NA -, Last modified by Jen Ferraz on 01 April 2011 11:20 AM

If you have installed a PHP application you downloaded, etc. and you get errors such as the following:

Notice: Undefined variable: VARIABLE NAME

It is most likely PHP's register globals being turned off causing the problem.

This problem can usually be attributed to a change made to PHP many versions ago that turned "register globals" off for security reasons. For more information on this, please see this web page:

http://www.php.net/manual/en/security.registerglobals.php

To resolve this, please ask the person who wrote the PHP scripts to modify their code to work without register globals. If that is not possible, you can turn register globals back on for just your site, or just a specific directory, by placing the following text in a file named .htaccess (Note the leading period) in the directory in question:

php_flag register_globals On

 

Most PHP application written since 2005 should not require register globals to be enabled.

(455 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako support.miva.com/supportsuite/index.php?