Hi
I am trying to give  user interface to my tool and willing to call R from
php. I am able to install, configure and run the example given on
rapache manual website http://rapache.net/manual.html and I suppose it is
working perfect.

I have a couple of varibles in php (such as input file path and other
variables) that I want to send to R. The manual mentions how to call an R
file but I could not figure out how to pass arguments from php (post
variables) to an R file or R functions.


# test.php file
<?php
$var1 = "cat";
$var2 = "dog";
$geneArray =  "";
$inpFile = "/home/fahim/webRugit/dataFile.php";
$processComplete = 0;


$processComplete = howToCall($var1, $var2, $geneArray, $inpFile);  // How to
communicate? How to invoke the R
?>

#R file to be called (Filename: test.R): Function name is foo.
foo ( $var1, $var2, $geneArray, $inpFile) )  // How to receive the variable.

#http.conf file. //What to modify in this file
ServerName localhost
LoadModule R_module  /usr/lib/apache2/modules/mod_R.so
ROutputErrors
<Location /rapachetest>
   SetHandler r-handler
   RFileHandler /home/fahim/webRugit/hello.R
</Location>

Do I need to modify any other file???

Thanks a lot.
Fahim

	[[alternative HTML version deleted]]

