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?
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
[12:58]
[12:58]
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
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