PDA

View Full Version : register globals is "off"


farley89hd
11-19-2004, 09:57 AM
I am having trouble getting a simple scipt to run, found this on the net. (last two lines)

My register globals is reading "off" should they be off and if not, how do I turn it on and what is it used for?

Tia


This will display all the php settings. Use 'find' to check the 'safe' mode section to make sure it is OFF. e.g. look under the Configuration PHP Core Table in the Directive column until you see safe_mode - then it MUST be off.
BTW: For some later versions of PHP, you may have to check to make sure register_globals are 'on' and you may have to use $_post, $_server type variables.

Horus_Kol
11-19-2004, 10:20 AM
REGISTER_GLOBALS is a security feature:

http://uk.php.net/manual/en/security.globals.php


It used to be default ON (prior to PHP 4.2) and allowed you to be a little lazy with code...

with REGISTER_GLOBALS set to OFF, you need to explicitly use things like $_SESSION, $_GET, and $GLOBALS to access any global variable...