Update func.php & cron.php

— Declare variable $_SERVER[‘DOCUMENT_ROOT’] due to variable not
wokring in cli.