Gossamer Forum
Home : General : Internet Technologies :

$HTTP_GET_VARS not working

Quote Reply
$HTTP_GET_VARS not working
hi,

i'm writing php pages hosted on Apache on a WindowsXP server.
i'm a bit stumped, i've just upgraded to Apache2 and PHP 5.0.3 (so global variables are off)
i have a few sites on the box and one of them objects to the use of $HTTP_GET_VARS but if i use $_GET it works perfectly. (the others have no problem with $HTTP_GET_VARS)

why would that happen? any ideas?

the error i get is:
Notice: Undefined variable: HTTP_GET_VARS in line .....

thanks,
vauneen
Quote Reply
Re: [vauneen] $HTTP_GET_VARS not working In reply to
according to PHP.net, for security reasons register_globals is off by default as of 4.2.0, which means you can't use $HTTP_GET_VARS without changing this setting. You SHOULD be using _GET anyway.

http://us4.php.net/reserved.variables
http://us4.php.net/variables.predefined
http://us4.php.net/...security.globals.php

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] $HTTP_GET_VARS not working In reply to
yes, i was actually wondering why 2 sites on the same server would act so differently.
one (more than one actually) allows me to use $HTTP_GET_VARS and the other doesnt.
wierd...

thanks for your response though.
vauneen
Quote Reply
Re: [vauneen] $HTTP_GET_VARS not working In reply to
Also, if you have register_globals turned off, then you will need to global'ise it. i.e;

global $HTTP_GET_VARS;

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates