H
hubb
Guest
how do i read user_beancounters in a php script?
it's weird. i'm trying to write a php script that displays the user_beancounters on a web-page (not in shell).
but whatever i try, i don't get any content out of "cat /proc/user_beancounters".
at the same time "cat /proc/meminfo" works perfect. safe_mode is off. permissions for meminfo and user_beancounters are the same -r--r--r--
whats wrong here? please..... thanx!
here's the script:
here's the result:
it's weird. i'm trying to write a php script that displays the user_beancounters on a web-page (not in shell).
but whatever i try, i don't get any content out of "cat /proc/user_beancounters".
at the same time "cat /proc/meminfo" works perfect. safe_mode is off. permissions for meminfo and user_beancounters are the same -r--r--r--
whats wrong here? please..... thanx!
here's the script:
PHP:
echo "beans:<br>\n";
exec('/bin/cat /proc/user_beancounters', $beans, $ret1);
var_dump ($beans);
echo "<br>return: ". $ret1;
echo "<br><br>meminfo:<br>\n";
exec('/bin/cat /proc/meminfo',$mem, $ret2);
var_dump ($mem);
echo "<br>return: ".$ret2;
here's the result:
beans:
array(0) { }
return: 0
meminfo:
array(22) { [0]=> string(25) "MemTotal: 2068292 kB" [1]=> string(25) "MemFree: 26996 kB" ........ }
return: 0