I know that the question "how to correctly store Database credentials?" has been asked a lot, but in a discussion with a coworker that question resurfaced and we couldn't determine what was the correct answer:
Ini File:
- Storing credentials in a .ini file looks elegant, but that kind of file can be viewed in a browser.
Php file:
- In-script storage looks a little hardcoded but a hacker has to get into the server in order to peek at the file.
So what would be the best approach?
P.S.: Any other storage options are accepted
Thanks in advance