• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

how do i get user_beancounters in a php script?

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:

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
 
Hi,

I have the same problem. Did you find an answer?

Thanks a lot!
Christian
 
Back
Top