<br><font size=2 face="sans-serif">I have a web cgi running on Win NT (version 4, service pack 5) that executes a perl program (call it foo.pl).</font>
<br><font size=2 face="sans-serif">foo.pl reads and conditions some data files, creates a summary data file for R, and then forks rcmd.exe (version 1.2.2) in BATCH mode (all of this is taking place on an NT box). </font>
<br><font size=2 face="sans-serif">foo.pl works fine if run from a command line (i.e. there are no apparent bugs in foo.pl and my R program that foo.pl executes). </font>
<br><font size=2 face="sans-serif">If foo.pl is run from the cgi, rcmd.exe does not do anything (no batch output/error file is written, nothing in the R program is apparently executed).</font>
<br>
<br><font size=2 face="sans-serif">I've interfaced Splus to cgi's in this way on UNIX and run into this same problem.</font>
<br><font size=2 face="sans-serif">The problem was resolved by defining some required environment variables that Splus needed prior to forking off Splus in a batch mode.</font>
<br>
<br><font size=2 face="sans-serif">I suspect that the same thing might be happening here - there are some environment variables that are not set when rcmd.exe is forked.</font>
<br><font size=2 face="sans-serif">I have set the R_HOME environment variable in the cgi prior to executing foo.pl and I've verified that R_HOME is set in foo.pl when it forks rcmd.exe but that wasn't enough to resolve the problem.</font>
<br>
<br><font size=2 face="sans-serif">Are there any other required environment variables for rcmd.exe?</font>
<br><font size=2 face="sans-serif">I know there are other ways to interace R to a browser but I am currently restricted to the scheme described above.</font>
<br>
<br><font size=2 face="sans-serif">Thanks in advance and I'll summarize any responses,</font>
<br><font size=2 face="sans-serif">Rick Higgs</font>
<br><font size=2 face="sans-serif">higgs@lilly.com</font>