I have 3 LAMP servers. Today I have noticed many of the following in the PHP error log:
[11-Feb-2010 10:58:03] PHP Notice: Undefined index: HOSTNAME in ...
Of course, this is happening in PHP when I do this:
When I run
hostname from the command line I get the proper (expected) hostname, also when I do
php -r 'echo $_ENV["HOSTNAME"];'
I get the proper (expected) hostname as well. Hence I think it's an issue in my Apache config rather than PHP (which is why I'm posting on ServerFault rather than StackOverflow)...
Any ideas? Servers are running RHEL.