У меня проблема с суперглобалами.
Значения всех их (SERVER, POST, GET, SESSION, COOKIE) равны NULL. Например, дамп возврата $ _SERVER
array (size=42)
'MIBDIRS' => null
'MYSQL_HOME' => null
'OPENSSL_CONF' => null
'PHP_PEAR_SYSCONF_DIR' => null
'PHPRC' => null
'TMP' => null
'HTTP_HOST' => null
'HTTP_USER_AGENT' => null
'HTTP_ACCEPT' => null
'HTTP_ACCEPT_LANGUAGE' => null
'HTTP_ACCEPT_ENCODING' => null
'HTTP_REFERER' => null
'HTTP_COOKIE' => null
'HTTP_CONNECTION' => null
'HTTP_UPGRADE_INSECURE_REQUESTS' => null
'PATH' => null
'SystemRoot' => null
'COMSPEC' => null
'PATHEXT' => null
'WINDIR' => null
'SERVER_SIGNATURE' => null
'SERVER_SOFTWARE' => null
'SERVER_NAME' => null
'SERVER_ADDR' => null
'SERVER_PORT' => null
'REMOTE_ADDR' => null
'DOCUMENT_ROOT' => null
'REQUEST_SCHEME' => null
'CONTEXT_PREFIX' => null
'CONTEXT_DOCUMENT_ROOT' => null
'SERVER_ADMIN' => null
'SCRIPT_FILENAME' => null
'REMOTE_PORT' => null
'GATEWAY_INTERFACE' => null
'SERVER_PROTOCOL' => null
'REQUEST_METHOD' => null
'QUERY_STRING' => null
'REQUEST_URI' => null
'SCRIPT_NAME' => null
'PHP_SELF' => null
'REQUEST_TIME_FLOAT' => null
'REQUEST_TIME' => null
Система Windows 7 + XAMPP + PHP 7.0.9 и виртуальный хост:
<VirtualHost *:80>
DocumentRoot "d:/php/test
<Directory />
Order allow,deny
Allow from all
Require all granted
</Directory>
ServerName http://test.com
UseCanonicalName Off
</VirtualHost>
И файл hosts
127.0.0.1 test.com