Environment variables

Permalink 1 user found helpful
Hi There,

My application/bootstrap/start.php file looks like this:
        'local' => array(
        'staging' => array(

Where should i but my custom database.php, app.php for each environment? I've created a folder called /application/config/local/database.php, /application/config/local/app.php but there files won't be called. Any idea?

View Replies: View Best Answer
moleculeFFF replied on at Permalink Reply
Did you get any information regarding this ?
andrew replied on at Permalink Best Answer Reply
Sorry for the lack of documentation on this. It's coming. :\ If you prepend your config files with the key and then a period, it should load those based on environment. So not this:


But this:

jegra replied on at Permalink Reply
Can't get this to work. Dev domain is specified in the 'local' array key, but the local.database.php file seems to be ignored (settings in database.php keep getting loaded). Is there another setting/config value that needs to be set to get this to work?
andrew replied on at Permalink Reply
It's the hostname of the server, not the domain – so you'll want to type "hostname" from your terminal/shall and see what's that's set to, and make sure that's the value of the array.
jegra replied on at Permalink Reply
Worked - thanks, Andrew!