Summary  Summary

Add to your favorites

Maps  Maps
Portal  Portal
Geomatic  Geomatic
Computers  Computers
Download  Download
Jobs  Jobs

Customize  Customize
Games  Games
Forums  Forums
GuestBook  GuestBook

GeoRezo  GeoRezo
Georama  Georama
Web design
Daniel FAIVRE©

CGI - Environment variables

  Français Français 
CGI - Environment variables
 CGI - Environment variables
  When a CGI conforming software is run, the server set differents variables useful for programmers. Here they are. Only the three firsts are always defined whatever the request is.
NameCurrent valueExplanations
SERVER_SOFTWAREApache/2.4.7 (Ubuntu)Name and version of server software.
SERVER_NAMEwww.geomaticien.comServer hostname, alias DNS, or IP adress.
SERVER_PROTOCOLHTTP/1.0Protocol and version.
SERVER_PORT80Server port.
REQUEST_METHODGETRequest method. For HTTP: "GET", "HEAD", "POST", etc.
PATH_INFO/index.phpCGI script could be acceeded by its virtual path, with extra informations after the path. Theses infos are in PATH_INFO.
PATH_TRANSLATED/flex/storage/ translated by server. Virtuals paths are mapped to real paths.
SCRIPT_NAME/fast-cgi-fake-php4Virtual path of current script.
QUERY_STRINGlang=en&NavTo=ordi/cgi/cgi_var&nR=nr_01What is it after ? in the script url.
REMOTE_HOSTClient name. If the server don't know, it should keep REMOTE_HOST unset and define REMOTE_ADDR.
REMOTE_ADDR44.221.70.232Client IP adress.
AUTH_TYPEAuthentification type, if the server support users authentification, and this script is protected (protocol dependant).
REMOTE_USERAuthentified user name
REMOTE_IDENTAuthentified user name, with server supporting RFC 931 authentification
CONTENT_TYPEReturned (by client) content type (by HTTP POST ou PUT).
CONTENT_LENGTHLength of theses datas.
HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8MIME types supported by the client.
HTTP_USER_AGENTCCBot/2.0 ( browser