Recommended way to manage multiple configs?

I have 4 different environments for an app (production, test, development, and demo).

I’d like to make it so a code refresh on any of the three downstream from dev has no exceptions that need to be managed per-server.

Docs say to load a different config file depending on the server. But $request->host() doesn’t work in bootstrap. Of course it would be trivial to use $_SERVER var to achieve the same. But I’m interested in what the recommended Cake-correct way to handle this is supposed to be,

Also, does doing this have any impact on caching/performance?

Hi, have a look at this plugin:

1 Like

The plugin seems promising, but there are strange issues.

  1. setting debug to false for any given environment doesn’t really work. the icon in the lower right is gone, but there’s still something else there, and viewing the page source reveals the debug div is still actually there.

  2. setting database connections doesn’t do anything at all, it just goes with whatever is in app.php

I managed to speak with Jose Gonzalez, the author of that plugin.

He no longer recommends using it for 3.3.

I will go back to my original plan of using $_SERVER variables to dynamically load different config files.