Use getenv function instead of $_SERVER to be compatible with php embedded web server