I've just switched my scripts to a different server. On the previous server this worked flawlessly, and now that I've switched them to a different server, I can't understand the problem.
I'm not sure it would help, but here's the relevant code.
$headers = apache_request_headers();
PHP Version is: PHP 5.3.2
From the docs, before the release of PHP 5.4.0:
PHP 5.4.0 and later support this function unconditionally.
Said docs also include replacement functions that mimic the functionality of
apache_request_headers
by stepping through$_SERVER
.