Getting more of the config.ini


Usually you will need to use the sections in the config.ini. They are like an object in OOP with (single) inheritance.

You usually begin to write your config.ini with a "common" section that all of the versions and languages of your application will share.

[common] = "My first app" = Mysqli = "utf8"

Here we set an adapter for our database server and a charset, that will be common obviously.

Then in dev environment, you will set a host and database with user/password. We create the "dev" section. This will be shared by all languages and versions in our developement environment.

[dev:common] = "mysql-dev-server.internal" = "development-user" = "development-password" = "app_dev"

Then you will have to configure the other sections that the framework will read for bootstrapping the various languages and versions that you will develop.

In this example, we are just using the (default) en_US locale and three versions : - cli (our cron tasks will be here) - api (our REST api) - web (our front app)




The three sections do not overwrite anything but just inherit from our "dev" section and will therefore share the same values for our database "".

Naming the sections

You have to name the sections with this syntax:

  • locale: (en_US in this example), the same as in the url.ini
  • environment: dev, prod, test, etc (also the same as in the url.ini)
  • version: the versions that you define in the url.ini (cli is auto defined, and then you can use the name that you want)


Then we will publish our application on the production servers, so we need a "prod" section:

[prod:common] = "db-prod-1.internal" = "app_prod" = "production-password" = "app_prod"

We overwrite with the production hostname, user, password, database's name.

This section ("prod") will be extended for our various languages and versions in production environment.




We are just inheriting from prod that contains already the right settings since our example app shares the same database server obviously.

Other settings

In the previous page the parameter for disabling cache was explained. In production we will need the cache.

So in the prod section, enable it with: