$HTTP_HOST fails on PHP 4 and Windows XP

I run a small PHP script that uses $HTTP_HOST to return the current host URL name, usually “”. Today is stopped working. My suspicions are a new Microsoft Windows Update (KB951748), though I don’t think it has fully installed yet.

The problem arises with PHP v4 on Apache 1.3 and Windows XP with Service Pack 3. The problem does not arise with PHP 5 with Apache 2.2.8.

The workaround is to change occurrences of $HTTP_HOST to $_SERVER[‘HTTP_HOST’]