title: Run cuda program using php, report no CUDA capable devices were detected
body: <p>I use <code>shell_exec($command)</code> running CUDA program,but report <code>*no CUDA capable devices were detected*.</code></p>
  
  <p>I had echo <code>$command</code>. I ran the command on my terminal and it successed.</p>
  
  <p>I guess that the problem may because of lacking of system environment(<code>PATH</code> ,etc.).
  I had added something on <code>/etc/apache2/apache2.conf</code> as follow:</p>
  
  <pre><code>#cuda 6.5
  SetEnv PATH=/usr/local/cuda/bin:$PATH
  SetEnv LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH
  </code></pre>
  
  <p>After I restarted the apache2 service, <code>*no CUDA capable devices were detected*</code>.</p>
  
  <p>What is the problem on my program?</p>