I have the file that stores the database connections private - basically the whole framework is sunk except for the public facing files (all models, controllers, views, and sensitive information have been removed from the htdocs). I was just curious if I had stored the database connection using an environment variable if that would be some kind of security issue.
The main reason I ask is because earlier I did a phpinfo() and bam there was my database connection lol. I know of course that you wouldn't want to display phpinfo() to not let people know about your settings, but I just wanted to make sure that this wouldn't be as easily accessible anywhere else.
I too believe that as long as you hide your sensitive information you would be safe, but I wanted to make sure that this environment variable wasn't going to be a major risk when storing my connections.