Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PHP question



Nathan Meyers wrote:
> Jerry Feldman wrote:
>> On Fri, 30 Mar 2007 10:54:23 -0400
>> Mark Richards <mark.richards at massmicro.com> wrote:
>>
>>> You could stick a call to PrintGetPostRequestVars() (below) at the top 
>>> of your script to see what has been sent.
>>>
>>> Offhand I recall there's significant changes going to php 5 and among 
>>> them principally are a change to the behaviour of "register_globals". 
>>> That may play into your issues.
> 
> As I vaguely recall, some variables access patterns changed for security
> reasons - you could no longer request them by their naked property names
> but instead as elements of a properties hash. There is probably a global
> PHP configuration flag to reenable the old behavior for pages that are
> written to rely on it.

php 4.1+ provides this:

bool import_request_variables ( string types [, string prefix] )


Imports GET/POST/Cookie variables into the global scope. It is useful if 
you disabled register_globals, but would like to see some variables in 
the global scope.

You could also loop through __GET[] and call
	parse_str();

to instantiate the variables at the top of the script (they will have 
local scope).

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org