[R] Calling rcmd.exe from a CGI

HIGGS_RICHARD_E_JR@lilly.com HIGGS_RICHARD_E_JR at lilly.com
Thu Aug 2 00:26:01 CEST 2001


I have a web cgi running on Win NT (version 4, service pack 5) that 
executes a perl program (call it foo.pl).
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). 
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). 
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).

I've interfaced Splus to cgi's in this way on UNIX and run into this same 
problem.
The problem was resolved by defining some required environment variables 
that Splus needed prior to forking off Splus in a batch mode.

I suspect that the same thing might be happening here - there are some 
environment variables that are not set when rcmd.exe is forked.
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.

Are there any other required environment variables for rcmd.exe?
I know there are other ways to interace R to a browser but I am currently 
restricted to the scheme described above.

Thanks in advance and I'll summarize any responses,
Rick Higgs
higgs at lilly.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20010801/1c7bf18d/attachment.html


More information about the R-help mailing list