variable writing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
spartan7
Forum Commoner
Posts: 29
Joined: Sun Jun 19, 2005 12:09 am

variable writing

Post by spartan7 »

Hi there

I have a site I recently installed on my webserver but there is a problem with getting it to run correctly, and I see what the problem is.

Basically, he's written all the $_GET/$_POST variables as ordinary variables. So in his script, instead of writing, $_GET['var'] he'll write $var and it must have worked somehow like that on the previous server.

Is there any simple way I can get the site working without having to change every single incidence of him writing $var when it needed to be $_GET['var'] to work ?

Thanks

PS I don't have permissions to alter the php.ini or related on the server so I'll need to find another route
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

siri.2180
Forum Newbie
Posts: 4
Joined: Wed Jun 27, 2007 1:26 am

Post by siri.2180 »

try extract($_REQUEST) / extract($_GET)
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

The correct answer here is: Modify the application to work without needing register_globals. Anything else and you might as well just abandon any hope of security.
Post Reply