title: How to execute python script using spark submit in php?
body: <p>I am working on an PHP application using MongoDB as a database platform. Collection in MongoDB has massive volume of data .Hence I have opted for Apache Spark to generate analytics.</p>
  
  <p>I need to execute spark-submit command from PHP application.But its execution doesn't return any output to PHP application.</p>
  
  <p>Following is code snippet</p>
  
  <pre><code>$result=shell_exec('./bin/spark-submit examples/src/main/python/pi.py'); 
  print_r($result);
  </code></pre>
  
  <p>Please suggest me an appropriate solution</p>