From 295283ca1c7986b90c57f688ea31f40bd3600b35 Mon Sep 17 00:00:00 2001 From: Adam Niedzwiedzki Date: Wed, 8 Mar 2017 18:43:04 +1100 Subject: [PATCH] Update user_dashboard.php (#2392) Calling which via php-fpm on centos returns null. CentOS has df in path for nginx/php-fpm scrtips. --- core/user_settings/user_dashboard.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/user_settings/user_dashboard.php b/core/user_settings/user_dashboard.php index 7ef8b8f0eb..c8cbabbec9 100644 --- a/core/user_settings/user_dashboard.php +++ b/core/user_settings/user_dashboard.php @@ -939,7 +939,11 @@ //disk usage if (stristr(PHP_OS, 'Linux')) { $df = shell_exec("/usr/bin/which df"); - $tmp = shell_exec($df." /home 2>&1"); + if($df){ + $tmp = shell_exec($df." /home 2>&1"); + } else { + $tmp = shell_exec("df /home 2>&1"); + } $tmp = explode("\n", $tmp); $tmp = preg_replace('!\s+!', ' ', $tmp[1]); // multiple > single space $tmp = explode(' ', $tmp);