Hello,
I have a audio test command
and it works fine when i type this in the linux shell window.Code:speaker-test -c 2 -t wav | sleep 5
BUT
when i want to run this command using php
It dont work and as i see the apache log i get this error messagePHP Code:<?php
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
#Defaults requiretty
usman ALL=(ALL) NOPASSWD: ALL
I am really not sure how to get it working.
Kindly help.
Thank you
usmangt



Reply With Quote
Bookmarks