R script in php -


i running php script containing rscript in terminal. working fine , giving output. same script if call webpage not giving output. have checked folder permission also. please me fix this.

my php script:

<?php $abc=exec('rscript dist/gs_r2html.r'); print "$abc\n"; ?> 

rscript:

a<-rnorm(1000) library(r2html) setwd('/var/www/test') html.title("data summary", file="dist/gshtml.htm",append=f) html(summary(a),file="dist/gshtml.htm",align="left") html(matrix(a[1:100],nrow=10,byrow=t),file="dist/gshtml.htm",align="left") html.title("histogram", file="dist/gshtml.htm")  jpeg("dist/plot2.jpg") hist(a,col="red") htmlinsertgraph("dist/plot2.jpg",file="dist/gshtml.htm",align="left")    dev.off() 

its due missing of rapache supports web application development using r , apache web server. followed steps mentioned in http://rapache.net/manual.html install , configure r in apache.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -