How do I give permission for the kill command?

<?php
 $comando = "kill -9 3104";
 $output = shell_exec($comando);
?>

I am running this web page, but it does not execute the command, in the log file it looks like this:

sh: 1: kill: Operation not permitted

How do I give permission to execute the command?

The process user running the command must be the user of the process id 3104 (in your example).
What problem are you trying to solve? Please give us your UNIX type.

As a side note kill -9 is always great choice. This option, -9, means no process can clean up after itself, and even system critical processes will get killed with no contemplation, if you escalate process privilege for an unprivileged account (user). It can really cause problems with things like file writing.

Moderator comments were removed during original forum migration.