Create a database config file

Promoted code makes no use of the user id and password properties of the ‘dbConnection’ component. Instead, the component will look for an encrypted file for the parameters. This encrypted file can be created in two ways: by a (provided) PHP script (config.php that you can find in the samples) or by using the database config utility of the ide.  As both work the same way, we’ll discuss the IDE way.

  • Using the config.php utility.

You can use this application in your production environment to set up the connection. The advantage is that you can change the connection at any time, or that you can deploy your application with the utility so that your customer can set it up by him or herself. Be sure to remove the utility after you are done, or rename it to something less obvious.

  • By the IDE.

The IDE allows you to set up a config file quickly, and especially for testing purposes, this is handy. If you are also responsible for your own deployment, this is the fastest way to deploy your connection parameters.

To create a database config file go to your database setup page:


Select the connection that you use in your project



Click on ‘Create Production DBConfig File’



Fill in the parameters and click ‘Apply.’ 

Usually, you only need to change the database name, user ID, and password, but you can also change the other parameters. The Key and vector come from the security tab of your project properties: