title: PHP shell_exec with lighttpd on Raspberry pi
body: <p>I'm creating simple Wi-Fi scanning script on raspberry pi. for that I used lighttp web server and php. I can run php without any issues. but when I run shell script using php it not properly return the results. my code is like this </p>
  
  <pre><code>&lt;?php
  $ssidoutput = shell_exec('. /var/www/html/scanssid.sh');
  sleep(3);
  echo "&lt;pre&gt;$ssidoutput &lt;/pre&gt;";
  #var_dump($ssidoutput );
  ?&gt;
  </code></pre>
  
  <p>but when I executing this I only get one SSID print on my web browser. but when I run shell script I can see full list of SSIDs on my terminal. I thought this is some kind of execution time issue and add sleep value. but that wont fix my issue. how to fix this. my shell script contain nothing but command to scan the SSIDs for Raspbian </p>