Le variabili d'ambiente di Apache

Segue una pratica pagina PHP che elenca tutte le variabili d'ambiente di Apache, visualizza i valori correnti (solo se il modulo PHP č presente sul server) e da una breve spiegazione del significato di ogni variabile.
Il suo output puņ essere visualizzato in http://openskills.info/info/enviro.php

<pre>
<b>STANDARD VARIABLES</b><br>
<?
print("GATEWAY INTERFACE: <b>$GATEWAY_INTERFACE</b> - Revision of the server CGI specification (format: CGI/revision)<br>");
print("SERVER NAME: <b>$SERVER_NAME</b> - The server's hostname as it would appear in self reverencing URLS<br>");
print("SERVER SOFTWARE: <b>$SERVER_SOFTWARE</b> <br> - The name and the version of the server software (format: Name/version)");
print("AUTH TYPE: <b>$AUTH_TYPE</b> - If user authentication is active, this is the method used to validate the user<br>");
print("CONTENT LENGHT: <b>$CONTENT_LENGHT</b> - The lenght of the object content, as given by the client<br>");
print("CONTENT TYPE: <b>$CONTENT_TYPE</b> - The kind of data sent with POST or PUT commands<br>");
print("PATH INFO: <b>$PATH_INFO</b> - Extra PATH information, given by the client<br>");
print("PATH TRANSLATED: <b>$PATH_TRANSLATED</b> - The server's translated version of PATH_INFO<br>");
print("QUERY STRING: <b>$QUERY_STRING</b> - Whatever follows the ? in the URL<br>");
print("REMOTE ADDR: <b>$REMOTE_ADDR</b> - The IP of the remote client making the request<br>");
print("REMOTE HOST: <b>$REMOTE_HOST</b> - The hostname of the remote client (if Apache is configured to make reverse DNS lookup of its clients)<br>");
print("REMOTE IDENT: <b>$REMOTE_IDENT</b> - Identd name of the remote user. (Useless)<br>");
print("REMOTE USER: <b>$REMOTE_USER</b> - The username used for the access to a page that requires authentication<br>");
print("REQUEST METHOD: <b>$REQUEST_METHOD</b> - The HTTP method used for the request: GET, POST, HEAD...<br>");
print("SCRIPT NAME: <b>$SCRIPT_NAME</b> - A virtual path to the script being executed.<br>");
print("SERVER PORT: <b>$SERVER_PORT</b> - The port used on the server (usually 80)<br>");
print("SERVER PROTOCOL: <b>$SERVER_PROTOCOL</b> - The protocol and the version used to handle the request. (format: Protocol/revision)<br>");
?>
<br><b>HEADER VARIABLES (the names of the headers sent by the client preceded by HTTP_ ) </b><br>
<?
print("HTTP ACCEPT: <b>$HTTP_ACCEPT</b> - The MIME types that the client will accept<br>");
print("HTTP ACCEPT CHARSET: <b>$HTTP_ACCEPT_CHARSET</b> - A list of character set that can be processed by the client<br>");
print("HTTP ACCEPT ENCODING: <b>$HTTP_ACCEPT_ENCODING</b> - The coding type that can be processed by the client<br>");
print("HTTP ACCEPT LANGUAGE: <b>$HTTP_ACCEPT_LANGUAGE</b> - The languages which can be processed by the client's user<br>");
print("HTTP AUTHORIZATION: <b>$HTTP_AUTHORIZATION</b> - The data of an HTTP authentication<br>");
print("HTTP CACHE CONTROL: <b>$HTTP_CACHE_CONTROL</b> - Information about how to handle the caching od the object requested<br>");
print("HTTP COOKIE: <b>$HTTP_COOKIE</b> - The cookie(s), if exists, sent by the client<br>");
print("HTTP FORWARDED: <b>$HTTP_FORWARDED</b> - An old variant of the Via: header<br>");
print("HTTP FROM: <b>$HTTP_FROM</b> - The e-mail addres of the client's user (if the browser is set to send it)<br>");
print("HTTP HOST: <b>$HTTP_HOST</b> - The name of the web server addressed by the client<br>");
print("HTTP PRAGMA: <b>$HTTP_PRAGMA</b> - An old HTTP/1.0 variant of the Cache-Control header<br>");
print("HTTP REFERER: <b>$HTTP_REFERER</b> - The URL of the page from which a link was traced<br>");
print("HTTP USER_AGENT: <b>$HTTP_USER_AGENT</b> - The browser used to send the request (format: Software/VersionLibrary/Version)<br>");
print("HTTP VIA: <b>$HTTP_VIA</b> - Information about the proxy servers eventually used for making the request<br>");
?>
<br><b>APACHE VARIABLES (some Apache specific environment variables)</b><br>
<?
print("DOCUMENT PATH INFO: <b>$DOCUMENT_PATH_INFO</b> - Additional path information passed to a document<br>");
print("DOCUMENT ROOT: <b>$DOCUMENT_ROOT</b> - The file path specified by the conf directive DocumentRoot<br>");
print("PATH: <b>$PATH</b> - The corrisponding shell environment variable<br>");
print("REMOTE PORT: <b>$REMOTE_PORT</b> - The port used on the client side<br>");
print("REQUEST URI: <b>$REQUEST_URI</b> - The URL path of the file called. Set by mod_rewrite<br>");
print("SCRIPT NAME: <b>$SCRIPT_NAME</b> - The URL path of the CGI script that was caleld<br>");
print("SCRIPT FILENAME: <b>$SCRIPT_FILENAME</b> - The absolute file path of the CGI script called<br>");
print("SCRIPT URI: <b>$SCRIPT_URI</b> - The absolute URL of the CGI script called<br>");
print("SCRIPT URL: <b>$SCRIPT_URL</b> - The URL path of the CGI script called<br>");
print("SERVER ADMIN: <b>$SERVER_ADMIN</b> - the e-mail address specified with the directive ServerAdmin<br>");
?>
<br><b>VARIABLES SET BY MOD_INCLUDE (if compiled in) </b><br>
<?
print("DATE GMT: <b>$DATE_GMT</b> - The current date in Greenwich Mean Time<br>");
print("DATE LOCAL: <b>$DATE_LOCAL</b> - The current date in local time zone<br>");
print("DOCUMENT NAME: <b>$DOCUMENT_NAME</b> - The filename (no full path) of the document requested but the user<br>");
print("DOCUMENT URI: <b>$DOCUMENT_URI</b> - The (%-decoded) URL path ot the document requested by the user<br>");
print("LAST MODIFIED: <b>$LAST_MODIFIED</b> - The last modification date of the document requested by the user<br>");
print("USER_NAME: <b>$USER_NAME</b> - The name of the user who started Apache<br>");
?>
</pre>

Privacy Policy