I need to run a sudo command from a PHP script in CentOS 7, but I am getting an error:
sudo: no tty present and no askpass program specified
I have edited my sudoers file with the following lines, as others have advised:
don't require tty:
Set no password for apache user:
apache ALL=(root) NOPASSWD: /path/to/app, /path/to/app2
(I have double-checked that these paths are correct). My errors persist. Any thoughts?