" . escapeshellarg($passthru_is_disabled_workaround_file), $output, $return_var); readfile($passthru_is_disabled_workaround_file); fclose($passthru_is_disabled_workaround_handle); // fclose(tmpfile()) automatically deletes the file, unlink is not required :) } if ($return_var != 0) { $errstr = "Internal server error: command returned non-zero: {$return_var}: {$cmd}"; echo $errstr; throw new Exception($errstr); // make sure it ends up in an errorlog somewhere }