Issue
So, my php code looks like this:
exec('ps aux', $out);
Running that on Ubuntu gives me a webpage with all running processes (all users), but on Centos OS 7 it shows only the processes of the 'apache' user. Is there any way I can fix that?
EDIT: Any way, I'm running it on a VM, it's just a school project.
sample output:
apache 8758 0.0.0.1 33052 7308 ? S S 03:50 0:00 /usr/sbin/httpd - DFOREGROUND
apache 1421 0.0.0.2 5128 2780 ? R 15:24 0:00 ps aux
Solution
The answer depends on a lot of stuff on the server side.
More than likely what is happening is that your host is isolating your apache instances using CPU groups or similar. I would ask your host or the system admin why this is not working, but more than likely they'll just tell you they won't allow it. Allowing that sort of thing can have serious security implications.
Answered By - Kyle Answer Checked By - Marilyn (WPSolving Volunteer)