variables_order and track_vars
| From: | Duncan Maitland | Date: | Fri, 28 Sep 2001 06:06:44 +0000 |
| Subject: | variables_order and track_vars | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-4425@lists.php.net to get a copy of this message | ||
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?
from Duncan Maitland
dnma@ozemail.com.au