| Variable | Value |
GATEWAY_INTERFACE | The revision number of the version of CGI, either RCGI or LCGI, with which the server complies. |
SERVER_NAME | The hostname of the server or IP address of the server. |
SERVER_SOFTWARE | The name and version of the information server software responding to the request. |
These environment variables are specific to requests handled by RCGI and LCGI applications.
| Variable | Value |
AUTH_TYPE | The name of the authentication scheme used in the request. |
CONTENT_LENGTH | The length of the data sent by the client. |
CONTENT_TYPE | The MIME CONTENT_TYPE for any data that was submitted with the request. |
HTTP_ACCEPT | The MIME types that the client supports, as given by the HTTP header. |
PATH_INFO | Extra path information as given by the client. The path information is decoded by the server if it arrives in the form of a URL before it is passed onto the script. |
PATH_TRANSLATED | A translated version of PATH_INFO, which is provided by the server. |
QUERY_STRING | Anything that follows the first ? in the URL. |
REMOTE_ADDR | The IP address of the remote host making a request. |
REMOTE_HOST | The name of the remote host making a request. |
REMOTE_USER | The username that was provided during the authentication process, if one occurred. |
REQUEST_METHOD | The method used to make the request (GET or POST). |
SCRIPT_NAME | The virtual path to the script being executed. |
SERVER_PORT | The port number to which the request was sent. |
SERVER_PROTOCOL | The name and revision number of the information protocol used to deliver the request. |
The following table shows the names by which statements in BASIC and Perl scripts refer to the different environment variables.
Environment Variable Naming Conventions
| Variable Name | BASIC Reference | Perl Reference |
CONTENT_LENGTH | content_length$ | $ENV{`CONTENT_LENGTH'} |
CONTENT_TYPE | content_type$ | $ENV{`CONTENT_TYPE'} |
GATEWAY_INTERFACE | gateway_interface$ | $ENV{`GATEWAY_INTERFACE'} |
HTTP_ACCEPT | http_accept$ | $ENV{`HTTP_ACCEPT'} |
PATH_INFO | path_info$ | $ENV{`PATH_INFO'} |
PATH_TRANSLATED | path_translated$ | $ENV{`PATH_TRANSLATED'} |
QUERY_STRING | query_string$ | $ENV{`QUERY_STRING'} |
REMOTE_ADDR | remote_addr$ | $ENV{`REMOTE_ADDR'} |
REMOTE_HOST | remote_host$ | $ENV{`REMOTE_HOST'} |
REMOTE_USER | remote_user$ | $ENV{`REMOTE_USER'} |
REQUEST_METHOD | request_method$ | $ENV{`REQUEST_METHOD'} |
SCRIPT_NAME | script_name$ | $ENV{`SCRIPT_NAME'} |
SERVER_NAME | server_name$ | $ENV{`SERVER_NAME'} |
SERVER_PORT | server_port$ | $ENV{`SERVER_PORT'} |
SERVER_PROTOCOL | server_protocol$ | $ENV{`SERVER_PROTOCOL'} |
SERVER_SOFTWARE | server_software$ | $ENV{`SERVER_SOFTWARE'} |