Replaced getallheaders -function call with _SERVER