1

I have yii2 project and use R code for report and image generation. I use PHP exec() + Rscript for now. But it has some issue like ONLY ONE USER can be using the web app at a time. i try use PHP exec() Parallel Processing approach :

exec("Rscript Rcode > file.txt &");

But it doesn't work (i dont know why..). so i should try another way, and i hear about Rapache / opencpu.

So, i have some questions:

  1. Are Rapache / opencpu can handle multiple request?

  2. Is that possible to make yii2 project in Rapache/opencpu?

  3. if is possible to use php exec() that can handle multiple request, how can i do that?
Galang Re
  • 215
  • 1
  • 4
  • 12
  • (1) [Yes](https://www.opencpu.org/) (see *"Concurrency by design"*), as well as Apache scales and handles concurrency. (2) Sorry, not a yii2 person. (3) I urge against this method: it may work for a few users but will scale very poorly (not to mention the additional steps that often should be taken for security). – r2evans Aug 13 '16 at 03:26

0 Answers0