I am a complete beginner with Linux, and the Pi is driving my education in both Linux and several of the web based programming languages (HTML, PHP, etc.)
I have successfully installed http://6xq.net/projects/pianobar/ via the Debian repo's, and have it running without issue when launching via the command line as the user 'pi'. I have also used a fellow Pi user's web interface for control https://github.com/jacroe/pidora.
Now, I want to be able to launch pianobar without the CLI, simply by opening the website served through lighttpd and PHP (also properly functioning). In a PHP script, I have the following:
Originally, I had just the exec("/usr/bin/pianobar"); , but added the rest as it caused the script to hang waiting for it to complete. Again, I am a beginner, so if this is wrong, I wouldn't know it.
Code: Select all
<?php $cmd = "/usr/bin/pianobar"; exec($cmd . " > /dev/null &"); ?>
The above does launch pianobar, as "ps aux" shows it running under the user 'www-data' with the STAT = "S", but I have no sound output.
Can someone point me in the direction I should even be looking next?