Re: variables_order and track_vars

From: Date: Sat, 29 Sep 2001 09:25:41 +0000
Subject: Re: variables_order and track_vars
References: 1  Groups: php.install 
Request: Send a blank email to php-install+get-4436@lists.php.net to get a copy of this message
Duncan Maitland wrote:
In one of my applications I would like to have only environment, server and session variables in the global namespace, and then access GET, POST and cookies variables from the $HTTP_*_VARS arrays. As track_vars is always on as of PHP 4.0.3 then I should be able to access these regardless of any settings in my PHP configuration. My understanding is that the PHP variables_order directive controls the way variables are added into the global namespace. When I leave register_globals on and set
php_value    variables_order    ES
then environment, server and session variables are added to the global namespace and you can register session variables from the global namespace, as expected. However, it seems that as my variables_order setting doesn't list GPC (get, post and cookies) that not only are they not registered in the global namespace, but that the $HTTP_GET_VARS, $HTTP_POST_VARS and $HTTP_COOKIES_VARS arrays aren't enabled either. Is this expected behaviour? Is there a workaround?
I think if PHP worked like you described, it's a bug. What version are you using? -- Yasuo Ohgaki

« previous php.install (#4436) next »