Skip to content
Advertisement

What does “EGPCS” mean in PHP?

I found the following code in php.ini. what does that mean?

And “PHP registers” — what is that?

; 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.
variables_order = "EGPCS"

Advertisement

Answer

The manual about the directive might help you a bit more : variables_order (quoting) :

Sets the order of the EGPCS (Environment, Get, Post, Cookie, and Server) variable parsing. For example, if variables_order is set to “SP” then PHP will create the superglobals $_SERVER and $_POST, but not create $_ENV, $_GET, and $_COOKIE. Setting to “” means no superglobals will be set.

Also note (quoting again) :

The content and order of $_REQUEST is also affected by this directive.

I suppose this option was more important a while ago, when register_globals was still something used, as the same page states (quoting) :

If the deprecated register_globals directive is on (removed as of PHP 6.0.0), then variables_order also configures the order the ENV, GET, POST, COOKIE and SERVER variables are populated in global scope. So for example if variables_order is set to “EGPCS”, register_globals is enabled, and both $_GET['action'] and $_POST['action'] are set, then $action will contain the value of $_POST['action'] as P comes after G in our example directive value.

I don’t see what I could add ; did this help ?
Or is this something in this that causes you a problem ?

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement