I want to use php\'s exec() function on an ubuntu server. The problem is, I alway get an error, that the command is not found. For example using
exec(\"echo
Try shell_exec() instead. exec should not invoke ANY shell to execute your program. Alternately, you can invoke bash with exec like
exec("/bin/bash -c \"echo $foo > bar.txt'\"")