<?php
// This file is to check if your server has required environment variables to run XOOPS properly
// This script will just display the variables, and will not change anything on your server or XOOPS.
// This script is not required to run XOOPS. It should be used only when you need to report your server environments to the XOOPS Dev Team.

echo "<p>PHP:  <b>".phpversion()."</b></p>";
echo "<p>";
echo "\$REQUEST_METHOD:  <b>".$REQUEST_METHOD."</b><br />";
echo "\$REQUEST_URI:  <b>".$REQUEST_URI."</b><br />";
echo "\$SCRIPT_NAME:  <b>".$SCRIPT_NAME."</b><br />";
echo "\$HTTP_REFERER:  <b>".$HTTP_REFERER."</b><br />";
echo "\$HTTP_HOST:  <b>".$HTTP_HOST."</b><br />";
echo "\$HOSTNAME:  <b>".$HOSTNAME."</b><br />";
echo "\$REMOTE_ADDR:  <b>".$REMOTE_ADDR."</b><br />";
echo "</p>";
echo "<p>";
echo "\$HTTP_SERVER_VARS['REQUEST_METHOD']:  <b>".$HTTP_SERVER_VARS['REQUEST_METHOD']."</b><br />";
echo "\$HTTP_SERVER_VARS['REQUEST_URI']:  <b>".$HTTP_SERVER_VARS['REQUEST_URI']."</b><br />";
echo "\$HTTP_SERVER_VARS['SCRIPT_NAME']:  <b>".$HTTP_SERVER_VARS['SCRIPT_NAME']."</b><br />";
echo "\$HTTP_SERVER_VARS['HTTP_REFERER']:  <b>".$HTTP_SERVER_VARS['HTTP_REFERER']."</b><br />";
echo "\$HTTP_SERVER_VARS['HTTP_HOST']:  <b>".$HTTP_SERVER_VARS['HTTP_HOST']."</b><br />";
echo "\$HTTP_SERVER_VARS['HOSTNAME']:  <b>".$HTTP_SERVER_VARS['HOSTNAME']."</b><br />";
echo "\$HTTP_SERVER_VARS['REMOTE_ADDR']:  <b>".$HTTP_SERVER_VARS['REMOTE_ADDR']."</b><br />";
echo "</p>";
echo "<p>";
echo "\$HTTP_ENV_VARS['REQUEST_METHOD']:  <b>".$HTTP_ENV_VARS['REQUEST_METHOD']."</b><br />";
echo "\$HTTP_ENV_VARS['REQUEST_URI']:  <b>".$HTTP_ENV_VARS['REQUEST_URI']."</b><br />";
echo "\$HTTP_ENV_VARS['SCRIPT_NAME']:  <b>".$HTTP_ENV_VARS['SCRIPT_NAME']."</b><br />";
echo "\$HTTP_ENV_VARS['HTTP_REFERER']:  <b>".$HTTP_ENV_VARS['HTTP_REFERER']."</b><br />";
echo "\$HTTP_ENV_VARS['HTTP_HOST']:  <b>".$HTTP_ENV_VARS['HTTP_HOST']."</b><br />";
echo "\$HTTP_ENV_VARS['HOSTNAME']:  <b>".$HTTP_ENV_VARS['HOSTNAME']."</b><br />";
echo "\$HTTP_ENV_VARS['REMOTE_ADDR']:  <b>".$HTTP_ENV_VARS['REMOTE_ADDR']."</b><br />";
echo "</p>";
echo "<p>";
echo "getenv(\"REQUEST_METHOD\"):  <b>".getenv("REQUEST_METHOD")."</b><br />";
echo "getenv(\"REQUEST_URI\"):  <b>".getenv("REQUEST_URI")."</b><br />";
echo "getenv(\"SCRIPT_NAME\"):  <b>".getenv("SCRIPT_NAME")."</b><br />";
echo "getenv(\"HTTP_REFERER\"):  <b>".getenv("HTTP_REFERER")."</b><br />";
echo "getenv(\"HTTP_HOST\"):  <b>".getenv("HTTP_HOST")."</b><br />";
echo "getenv(\"HOSTNAME\"):  <b>".getenv("HOSTNAME")."</b><br />";
echo "getenv(\"REMOTE_ADDR\"):  <b>".getenv("REMOTE_ADDR")."</b><br />";
echo "</p>";
echo "<p>";
echo "<a href='checkenv.php'>Check Referer</a>";
echo "</p>";
?>