Using phpsysteminfo with PHP-FPM

Hi all. Hope you are all well.

Can anyone help me get phpsysteminfo working with Hestia (Apache & PHP-FPM)?
The only way I can get it working is to not use PHP-FPM and use the web template “phpfcgid” on a test install.

I understand if its a security thing, but I really like using phpsysinfo to monitor my server.
It seems it does not have permission to access the required info:

file_exists(/proc/uptime) - the file does not exist on your machine
file_exists(/proc/loadavg) - the file does not exist on your machine
file_exists(/proc/stat) - the file does not exist on your machine
file_exists(/proc/cpuinfo) - the file does not exist on your machine
file_exists(/proc/meminfo) - the file does not exist on your machine

Is it possible in any way to allow PHP-FPM access to the required data?

Thanks for any help!

We have limited access to this files due to an safety issue

Don’t know if there is an easy fix for it

I also want to solve this problem. I would need “phpsysinfo” as well me too. :S

Checkout the following part

It limits the acceess to proc as a security feature. You can remove /etc/cron.d/hestia-proc and reboot your server.

Thank you so much for your help ScIT. This however has not made it work for me.
Is it PHP that is unable to read /proc?
If I do
cat /proc/loadavg
from my user account, or the admin account, I get the correct result and see the load averages, but phpsysinfo is still unable to read them saying that the file does not exist.
Thanks, John.

Probaly additional changes are needed, never used that script. Maybe have a look what @eris wrote in discord:
@thanior Probally alter openbase dir to allow /proc And maybe other config things



make sure your php.ini file’s include_path entry contains “.” make sure your php.ini has safe_mode set to ‘off’.

OK, I managed to figure this out. It was the PHP open_basedir setting, which is in php.ini but gets overruled by the PHP-FPM backend template. Here’s what I did:

cd /usr/local/hestia/data/templates/web/php-fpm/
sudo cp default.tpl default_phpsysinfo.tpl
sudo nano default_phpsysinfo.tpl

Change the line:

php_admin_value[open_basedir] = /home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/var/www/html:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/phppgadmin:/etc/roundcube:/var/lib/roundcube:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt


php_admin_value[open_basedir] = none

Then in the Hestia control panel, edit the web domain that hosts your phpsysinfo and change ‘Backend Template PHP-FPM’ to ‘default_phpsysinfo’ and magic, enjoy your phpsysinfo!

I should add, my server is only accessed by me, so I don’t think this will be a problem. I do use phpsysinfo a lot to monitor my server and am glad to have it back using PHP-FPM :wink:

Thanks for such a great project.


Its working! :partying_face:
Thank you!

1 Like