
mhx
Enthusiast
/ Moderator
May 29, 2001, 5:47 AM
Post #6 of 6
(837 views)
|
Hi, have you tried to run my script? If not: RUN IT! Not every HTTP server must set every possible environment variable. My server doesn't set AUTH_TYPE, for example. But besides REQUEST_URI, there are other variables in my environment that contain nearly the same information. When running my script, you will get a list of all of them, and perhaps you'll find something else you may want to use. Besides, I don't think your requested ENV variables are empty, I think they don't even exist. You can verify this by either running my script (did I mention you should run it?) or by explicitly checking if the key exists in the hash table using the exists function. FYI, here's a list of my server's variables, printed with a script similar to mine:
QUERY_STRING = HTTP_ACCEPT_LANGUAGE = en-us SERVER_PROTOCOL = HTTP/1.0 REMOTE_PORT = 4607 HTTP_ACCEPT = application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* HTTP_USER_AGENT = Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0) GATEWAY_INTERFACE = CGI/1.1 HTTP_HOST = mhx.netfirms.com SERVER_SOFTWARE = Apache/1.3.9 (Unix) SERVER_ADMIN = Your Webmaster SCRIPT_URI = http://mhx.netfirms.com/cgi/printenv REMOTE_ADDR = 156.153.255.114 SCRIPT_NAME = /cgi/printenv SCRIPT_URL = /cgi/printenv SERVER_NAME = mhx.netfirms.com DOCUMENT_ROOT = /d01/sec/s24/a0002e0t REQUEST_URI = /cgi/printenv REQUEST_METHOD = GET SCRIPT_FILENAME = /cgi/printenv PATH = /usr/local/bin:/usr/bin:/bin HTTP_CACHE_CONTROL = max-stale=0 SERVER_PORT = 80 -- Marcus
|