diff --git a/www/wr_crons/backend.php b/www/wr_crons/backend.php index 5dd926c0..b6326f35 100644 --- a/www/wr_crons/backend.php +++ b/www/wr_crons/backend.php @@ -8,7 +8,7 @@ class backend { function __construct() { - $this->USER = $_SERVER['SCRIPT_FILENAME']; + $this->USER = (array_key_exists('PWD',$_SERVER) && is_dir($_SERVER['PWD'])) ? $_SERVER['PWD'] : $_SERVER['SCRIPT_FILENAME']; $this->USER = str_replace('/home', '', $this->USER); $this->USER = strtok($this->USER, '/'); if ($this->USER == 'opt') {