I have a small script I tested on the command line using php test.php. test.php This works fine. I am able to run the script and get the desired result. However, when I add the code to a file being run by my PHP server, the result is empty. My OS is FreeBSD. Looking at the man page for ps