I am using shell_exec command to get the back end processes of PHP. Like:
$dir = shell_exec("ls -la"); //returns directory listing
$date = shell_exec("date"); //returns date
$pid = shell_exec("pidof php"); //returns nothing !!!
If I run "pidof php"
from command console as root, it gives me the correct result. I'm using PHP 5.5
and CentOS 6.5
.
What additionally I need to do to get the processes?
N.B: If I run the file from command line, it gives me the correct result. But the same file when running from browser, can't return the processes.