I've been working on a PHP application running in a Docker container, and I'm facing an issue accessing environment variables (env) within my PHP code. I've set these environment variables using the `-e` flag while running the `docker run` command.
I've tried accessing the environment variables in my code using `getenv('VAR_NAME')`, but it doesn't seem to work. It returns false or an empty string.
To verify if the environment variables are set correctly within the container, I used the `docker exec -it [container_id] env` command, and I can see that the variables are indeed present.
I also tried using `printenv` command within the container, and it also shows that the variables are set.
My suspicion is that there might be something wrong with my PHP code or the way I'm trying to access the environment variables. Do I need to configure anything specific within Docker or PHP to make it work?
Thank you in advance for any help or guidance you can provide!