I am using exec()
to call python script. It return error code 1, but I type it on terminal is okay.
My operating system is Ubuntu 14.04 LTS.
Here is my php exec()
content :
exec("sudo python /path/to/python.py --videoId $link", $output, $return);
I use visudo
to set www-data can get root.
www-data ALL=(ALL) NOPASSWD: /path/to/upload.php
Did I miss something have to set or the code is wrong?