Skip to main content

CGI Environment Variables

So here goes the list of all the Environment variables that are inbuilt and can be used with ur CGI script:



Variable NameValue
DOCUMENT_ROOTThe root directory of your server
HTTP_COOKIEThe visitor's cookie, if one is set
HTTP_HOSTThe hostname of your server
HTTP_REFERERThe URL of the page that called your script
HTTP_USER_AGENTThe browser type of the visitor
HTTPS"on" if the script is being called through a secure server
PATHThe system path your server is running under
QUERY_STRINGThe query string (see GET, below)
REMOTE_ADDRThe IP address of the visitor
REMOTE_HOSTThe hostname of the visitor (if your server has reverse-name-lookups on; otherwise this is the IP address again)
REMOTE_PORTThe port the visitor is connected to on the web server
REMOTE_USERThe visitor's username (for .htaccess-protected pages)
REQUEST_METHODGET or POST
REQUEST_URIThe interpreted pathname of the requested document or CGI (relative to the document root)
SCRIPT_FILENAMEThe full pathname of the current CGI
SCRIPT_NAMEThe interpreted pathname of the current CGI (relative to the document root)
SERVER_ADMINThe email address for your server's webmaster
SERVER_NAMEYour server's fully qualified domain name (e.g. www.cgi101.com)
SERVER_PORTThe port number your server is listening on
SERVER_SOFTWAREThe server software you're using (such as Apache 1.3)


Comments

Popular posts from this blog

15 things that you should give up to be happy

1. Give up your need to always be right.  There are so many of us who can’t stand the idea of being wrong – wanting to always be right – even at the risk of ending great relationships or causing a great deal of stress and pain, for us and for others. It’s just not worth it. Whenever you feel the ‘urgent’ need to jump into a fight over who is right and who is wrong, ask yourself this question:  “Would I rather be right, or would I rather be kind?” Wayne Dyer. What difference will that make? Is your ego really that big? 2. Give up your need for control.  Be willing to give up your need to always control everything that happens to you and around you – situations, events, people, etc. Whether they are loved ones, coworkers, or just strangers you meet on the street – just allow them to be. Allow everything and everyone to be just as they are and you will see how much better will that make you feel. “By letting it go it all gets done. The world is won by those who let it go. But when

XAMPP: Couldn't start MySQL!

XAMPP: Couldn't start MySQL! Trying to run mysql on ubuntu 10.10 and give this vauge error "XAMPP: Couldn't start MySQL!" Try this 1. Open a terminal. 2. run this command sudo chown -hR root /opt/lampp 3. then run this sudo chmod -R 777 /opt/lampp 4. Now Restart XAMPP sudo /opt/lampp/lampp restart U are all set. And if u r getting the follwing warning after restarting "Warning: World-writable config file ‘/opt/lampp/etc/my.cnf’ is ignored" 1.Open terminal 2.Migrate to /opt/lampp/etc 3.run the command sudo chmod 755 my.cnf

Show full path in iterm

Show Full Path in Terminal Opern Iterm, duh! Go to you home direct Type:   cd ~ Type:   mate .bashrc Type:  export PS1=" " Between the quotation marks, you can add the following lines to customize your Terminal prompt: \d – Current date \t – Current time \h – Host name \# – Command number \u – User name \W – Current working directory (ie: Desktop/) \w – Current working directory, full path (ie: /Users/Admin/Desktop) export PS1="\u@\h\w$ "   which will look like:  Admin@MacBook~Desktop/$ " mate is text mate you need to install it in mac to make it work or you can also use free editors like nano, vi/vim. Source: soniajahid