Apache may not aware the PATH to R, try 'exec("/pathToR/R CMD ...")'.
In addition, apache and R should be in the same physical driver.
-Junwen
> I've developed a web application in PHP and R
>
> my script is
>
>
> <?php
>
> ...
> exec("R CMD BATCH --silent /home/marcello/R_in/myfile.bat
> /home/marcello/R_out/myfile.out");
>