Changed apache_getenv() to getenv(). WP CLI fails when we use apache_getenv() but not getenv().