[PHP] php5.3 exec() : output truncate

2013-01-30 Thread patrick ficheux
Hi, I want to get the list of running processes. also, I call exec() with ps -A (ps -A displays almost all processes of all users) Unfortunatly, the output of ps -A seems incomplete the test file test.php: ?php unset($buf); unset($res); exec(ps -A, $buf, $res); for($i=0; $i count($buf);

Re: [PHP] php5.3 exec() : output truncate

2013-01-30 Thread Jim Lucas
On 01/30/2013 10:14 AM, patrick ficheux wrote: Hi, I want to get the list of running processes. also, I call exec() with ps -A What user is your httpd process running as? run this from your cli: ps aux | grep httpd and show us the output -- Jim Lucas http://www.cmsws.com/

[PHP] [SOLVED] Re: [PHP] php5.3 exec() : output truncate

2013-01-30 Thread patrick ficheux
I found the reason of this issue : SELinux by defaut, SELinux is enabled on CentOS5.5 = httpd runs with restricted rights If I temporary disabled SELinux + restart httpd = ps -A from my script runs as expected $ setenforce 0 $ /etc/init.d/httpd restart Le 30/01/2013 19:14,