I conducted several tests on LightTPD 1.4.20 and PHP 5.3.0 using magic_quotes_gpc = On and $_SERVER not changed (at least [SERVER_NAME] => local'host not). $_SESSION also does not affect magic_quotes.
$_GET , $_POST , $_COOKIE and $_REQUEST were affected (and their partners $GLOBALS ).
In addition, changes to GPC $_REQUEST are not automatically reflected in $_REQUEST .
As for the superglobal $_FILES and $_ENV , I cannot test them.
I finally ran this test and, to my surprise, both $_FILES and php://input were affected .
source share