changing settings.php after the subsite is created through AEgir

Events happening in the community are now at Drupal community events on www.drupal.org.
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

Categories:

Comments

Aegir does not support

Posted by mig5 on June 18, 2010 at 12:51am

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

Posted by drup_lr on June 18, 2010 at 6:32pm

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.

Aegir hosting system

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /