Missing SERVER_NAME in non-web applications fixed