Posted by drup_lr on June 17, 2010 at 5:20pm
Everything works fine with AEgir but i would like to change the settings.php once the verify is completed . dynamically i want to add db_prefix to my settings.php . please advise me
Everything works fine with AEgir but i would like to change the settings.php once the verify is completed . dynamically i want to add db_prefix to my settings.php . please advise me
Comments
Aegir does not support
Aegir does not support db_prefixes. What you want to do (modify the settings.php dynamically) isn't impossible, but don't use db_prefixes.
But for general manipulation/adding to the settings.php, it is possible to modify the settings.php of a site on verify by making a file in /var/aegir/config/includes/global.inc with something like this:
$thishost = $_SERVER[HTTP_HOST];
if(preg_match("/(dev.mysite.net)/", $thishost)) {
// add custom stuff here such as $conf['maintenance_theme'] = 'my_theme';
}
This will get read in on verify and included into the settings.php of the relevant site.
thank you
This i was helpful to me , i have one more question is there a way we can add this code dynamically after the site is created through Aegir.