--- trackfield_graph.inc Thu Feb 05 04:27:38 2009 +++ trackfield_graph.inc Thu Mar 19 11:34:04 2009 @@ -1,4 +1,18 @@ $value) { + if (substr($name, 0, 5) == 'HTTP_') { + $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; + } + } + return $headers; + } +} /* Where we will store our cached graphs */ @@ -271,7 +285,10 @@ * Tell Apache not to compress it again. */ - apache_setenv('no-gzip', '1'); + // Checks if this function exists first, in case php is not an apache module... + if (function_exists('apache_setenv')) { + apache_setenv('no-gzip', '1'); + } /* Second best - see if we have this in our cache. */ $cache_file = _trackfield_graph_cache_file($graphargs);