I have a audio test command
and it works fine when i type this in the linux shell window.
speaker-test -c 2 -t wav | sleep 5
when i want to run this command using php
It dont work and as i see the apache log i get this error message
shell_exec("sudo -u usman speaker-test -c 2 -t wav | sleep 5");
Then i Google and someone told to make the sudouser (in my case usman) a passwordless user.
sudo: no tty present and no askpass program specified
What changes i have made in my /etc/sudoers files are
usman ALL=(ALL) NOPASSWD: ALL
I am really not sure how to get it working.