Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
.ENV Instead of putting credentials in config.php
odannyc
New
So I want to be able to put database passwords into .env file in the root of my app and .gitignore that file.
I was looking around and found phpdotenv solution but didn't seem to work well since I keep getting a 500 server error
Anyone have any suggestions?
Tagged:
0
Comments
Don't do it is my suggestion. The framework is designed a certain way for a reason. config.php itself should .gitignored
What are trying to achieve?
grep is your friend.
I like the idea of having a universal file for db access. But I use different databases for each different purpose so it wouldn't be of any help for me personally.
I understand the need to give any extra security on anything. But wouldn't it be easier to use a .htaccess like that in your /conf directory?
But that all doesn't answer your question. I guess it should be possible. Maybe you could add some lines of code in
/conf/bootstrap.before.php
to add your db credentials to your configuration...Actually it is quite easy!
/conf
folder calledbootstrap.early.php
/conf/config.php
That's it!