In traditional Zend-based application coding, database parameters are stored in application.ini. This saves the settings for each application.
Has anyone here at StackOverflow explored the ability to move database settings from application.ini to the environment? For example, the main way would be to save, perhaps, the database connection settings in the envvars Apache2 file, or perhaps something like / etc / profile or / etc / environment.
There are several reasons why I would like to do this:
1) There is a security risk when you have live production database settings in the application. Developers may inadvertently connect to the database in real time and damage the clientโs confidential data. This will protect both developers and end users.
2) It is difficult to maintain and manage db settings for multiple applications. For example, if the username or password is changed for the database, we will need to change application.ini or several applications, which would mean deploying the entire file or the entire application again.
3) An application can be deployed to mark up โproductionโ environments where database settings vary. Therefore, there may be several sections in application.ini - for example, and production-datacentreX, production-datacentreY.
As you can see, there is an argument about saving the database settings on the server side. Therefore, it might be better to have database parameters outside the application in the global scope for all applications to access? It would be its own source control, perhaps it would not be available to developers.
What do you think? Has anyone done something like this? I like the idea of โโa global application.ini application (perhaps called database.ini?)
Looking forward to hearing answers to this question.
Hello,
Steve