[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: off topic question about cgi-scripts?



Meni, Hi

We are the Linux Group, Not WWW!
Please see my pages at http://www.mardanit.co.il/Center
And you will find out plenty newsgroups, mailing list, webboards and 
wonderfull on-line resources to solve your problems. Thanks

> 1. can I pass an enviroment variable of the local machine to a
> cgi-script. what is the HTML syntax?

Run this script to see what variables your httpd passes to the script:

-----------
#!/usr/local/bin/perl

print "Content-type: text/html\n\n";
while( ($n, $v) = each(%ENV)) { print "$n = $v <br>"; } print "<br>"; 
-----------

Since your cgi-scripts runs not as user but as "nobody" or some other 
"name". The Environment vars you set in some of you .cshrc or other or 
global .rc files are not catching here. 

I think that you have to play with your specific httpd to force passing 
other variables...

The only solution I can see is to hardcode them in your CGI-bin...

Hope it helps...
-------------------------------------------------------------------------------
Stas Bekman 	sbekman@iil.intel.com.il  [ WebMaster at Intel Corp. ]
Address:	Aba Silver 12/29, Haifa, 32694, Israel
Phones:		[w]  972-(0)4-865-5188, [h]  972-(0)4-828-2264/3020 
Home Page:	http://techunix.technion.ac.il/~ofelix
Resource Center http://www.mardanit.co.il/Center (CGI, PC, Security, Linux)
Linux-il Home:	http://www.linux.org.il/ 	


References: