What are all the standard CGI environment variables?

CGI scripts must have access to the list of environment variables set by the web server. What are their names?

+4
source share
4 answers

See RFC 3875 for the CGI specification, which contains all the necessary information. :-)

From RFC:

meta-variable-name = "AUTH_TYPE" | "CONTENT_LENGTH" | "CONTENT_TYPE" | "GATEWAY_INTERFACE" | "PATH_INFO" | "PATH_TRANSLATED" | "QUERY_STRING" | "REMOTE_ADDR" | "REMOTE_HOST" | "REMOTE_IDENT" | "REMOTE_USER" | "REQUEST_METHOD" | "SCRIPT_NAME" | "SERVER_NAME" | "SERVER_PORT" | "SERVER_PROTOCOL" | "SERVER_SOFTWARE" | scheme | protocol-var-name | extension-var-name protocol-var-name = ( protocol | scheme ) "_" var-name scheme = alpha *( alpha | digit | "+" | "-" | "." ) var-name = token extension-var-name = token 
+7
source

The hoohoo machine at the NCSA, which has CGI documentation, doesn't work, but this is what seems like a mirror .

+2
source

A quick google search finds what you need.

+1
source

Source: https://habr.com/ru/post/1305044/


All Articles