Fix: missing $_SERVER['TERM']