Use getenv() instead of superglobals. 

Sometimes they're not properly populated, but getenv() will always get the correct result.

Signed-off-by: Max Fierke <max@maxfierke.com>