[ACCEPTED]-What does "EGPCS" mean in PHP?-php
The manual about the directive might help 24 you a bit more :
variables_order (quoting) :
Sets the order 23 of the EGPCS (Environment, Get, Post, Cookie, and Server) variable 22 parsing. For example, if variables_order 21 is set to "SP" then PHP will 20 create the superglobals
$_POST, but not 19 create
$_COOKIE. Setting to "" means 18 no superglobals will be set.
Also note (quoting 17 again) :
The content and order of
$_REQUESTis also 16 affected by this directive.
I suppose this 15 option was more important a while ago, when 14 register_globals was still something used, as 13 the same page states (quoting) :
If the deprecated 12
register_globalsdirective is on (removed as of PHP 6.0.0), then 11 variables_order also configures the order 10 the ENV, GET, POST, COOKIE and SERVER 9 variables are populated in global scope. So 8 for example if variables_order is set 7 to "EGPCS", register_globals 6 is enabled, and both
$_POST['action']are set, then 5
$actionwill contain the value of
$_POST['action']as P comes 4 after G in our example directive value.
I 3 don't see what I could add ; did this help 2 ?
Or is this something in this that causes 1 you a problem ?
The accepted answer above is good. But 6 another important point to note here is 5 that if any of these flags is not set, that 4 variable will be empty when the script runs, i.e. if 3 variables_order is set to "GPCS" the $_ENV 2 variable will always be an empty array. Found 1 this out the hard way.
It controls the order in which the global 4 variables
$_POST, etc. are defined by PHP. The 3 letters just stand for categories, e.g.,
G for 2
$_GET. I seriously doubt you want to mess with 1 that setting.
More Related questions