About the $allowed problem

From: Date: Mon, 27 Aug 2001 19:34:28 +0000
Subject: About the $allowed problem
Groups: php.general 
Request: Send a blank email to php-general+get-64682@lists.php.net to get a copy of this message
<?php session_start(); if (!session_is_registered("allowed")){ $allowed=3306; session_register("allowed"); } var_dump($allowed); ?> called with : http://192.168.1.11/test2.php?allowed=5000 returns : int(3306) From php.ini : variables_order = "EGPCS" ; This directive describes the order in which PHP registers ; GET, POST, Cookie, Environment and Built-in variables (G, P, ; C, E & S respectively, often referred to as EGPCS or GPC). ; Registration is done from left to right, newer values override ; older values. register_globals = On ; Whether or not to register the EGPCS variables as global ; variables. You may want to turn this off if you don't want ; to clutter your scripts' global scope with user data. This makes ; most sense when coupled with track_vars - in which case you can ; access all of the GPC variables through the $HTTP_*_VARS[], ; variables. ; You should do your best to write your scripts so that they do ; not require register_globals to be on; Using form variables ; as globals can easily lead to possible security problems, if ; the code is not very well thought of. Andrey Hristov IcyGEN Corporation http://www.icygen.com 99%

« previous php.general (#64682) next »