...

View Full Version : Setting Register_Globals = On



Serex
01-07-2006, 05:18 AM
Ive just signed up to a new web host, webcentral. They have r_g set to off but i need to use it for my site. I may have posted on here before and i acquired a fix for it but i was unable to find the post again.

If anyone could assist me that would be great.

vinyl-junkie
01-07-2006, 08:16 AM
Is this (http://www.codingforums.com/showthread.php?t=72619&highlight=globals) what you're looking for?

If that doesn't work for you, check with your web host. They might have to use some funky way of turning off register_globals for you, same as what I had to go through.

Bill Posters
01-07-2006, 08:51 AM
Rather than open yourself up to a security flaw by having globals on, why not simply tweak your variable references so that they work with globals off?

http://uk2.php.net/register_globals
http://www.zend.com/zend/art/art-sweat4.php

trib4lmaniac
01-07-2006, 12:17 PM
You could

extract($_POST);
extract($_GET);
extract($_COOKIE);
extract($_SESSION);
extract($_SERVER);
extract($_FILES, EXTR_OVERWRITE);
But you're beter off doing what ^ said.

felgall
01-07-2006, 09:57 PM
Any script that doesn't work with register globals off is a lot less secure than one that works with register globals on. It is not like the code changes that are needed are all that difficult.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum