I've got a small c++ script on my raspberry pi which I want to execute from PHP on my small webserver, when I run the following command in my CLI the code executes : "/home/pi/kaku 1 a on". But when I run the following PHP code on my webserver shell_exec("/home/pi/kaku 1 a on"); the code that gets triggered by php simply doesn't run, When I don't give in any parameters by running shell_exec("/home/pi/kaku"); Than I simply get response that I need to fill in the parameters. The c++ code can be found overhere: https://github.com/chaanstra/raspKaku
The permissions of /home/pi/kaku has been set to 777 by using chmod for testing purposes. I am wondering why is my code not running?
shell_exec("/home/pi/kaku a 1 on")(change order of the first and second argument) ? Because from the code on github, the second argument should be a number :device = atol(argv[2]);Ifargv[2]does not begin with 0-9, device will be 0 ?