Configuring Modules in Install Profile I'm working on an install profile which brings in various modules and I was curious about the proper (or popular) convention for setting global variables  Right now I have two different ways of doing this:


In my settings.php file I set some variables directly in the $conf array:


  $conf['var'] = 'setting';

In the install function of my profile I set some variables using variable_set:  


  variable_set('var', 'setting');



I recognize that the first one will permanently retain the setting until the php file is altered, while the other can be changed at any time.

Is there any popular opinion/convention on the method of setting these variables(in the context of using an install profile)?

Thanks!
In general using hook_install or hook_enable or a hook_update function in a module is prefered over hardcoding the value in settings.php of your drupal site.

Another option is to use the Configuration module or Features to encapsulate your database configuration to code to be enabled on the drupal website.