So you think you PHP code is running ok and your script for killing bad guys is perfect. Let’s assume you made a script to kill processes according to some criteria, put you script on your good all CentOS 7 server, but suddenly you encounter the error:
PHP Fatal error: Call to undefined function posix_kill() in ./kill-process.php on line 64 Killed process id: 21899 PHP Fatal error: Call to undefined function posix_kill() in ./kill-process.php on line 64 Killed process id: 21899 PHP Fatal error: Call to undefined function posix_kill() in ./kill-process.php on line 64
So you just missed a php plugin and there it is: “php-process”. Just install it with yum!
yum install -y php-process
And the error will disappear and the next time you want to kill some bad process you’ll sure do it!