Pantheon Community

What needs to be done to the civicrm.settings.php?

I’m trying to install the CiviCRM Starter Kit on Pantheon, but it looks like I need to edit the civicrm.settings.php file in order to get this to work.

Is there any documentation about which placeholders in the settings file need to be edited, and where those values are in my Pantheon site?

Are you using the Pantheon Spinup Starter Kit auto-install? When you go that route, after the initial Drupal 7 install you get a message that " CiviCRM has not been installed. The CiviCRM Starter Kit requires CiviCRM to be installed before continuing. Please install CiviCRM now." When you click on that link, most of the settings are configured for you.

The docs for setup here note the main placeholder is CIVICRM_UF_BASEURL, which should be changed to your production site url.

Once initial setup is complete, the resource urls page (civicrm/admin/setting/url?reset=1) should show what the starter kit set the placeholders to be in civicrm.settings.php.

1 Like

Drupal 8 + CiviCRM on the Pantheon Platform is for Drupal 8, but it may be of some help.

I’ve updated that Drupal doc https://www.drupal.org/docs/7/modules/civicrm-starter-kit/installing-civicrm-starter-kit since it was a bit out of date. If you’re using the Starter Kit then you won’t really have to change anything in civicrm.settings.php unless you’re going to also have a local dev copy.

And if you’re not using the Starter Kit you may want to borrow from the starter kit’s civicrm.settings.php file: https://github.com/herbdool/civicrm-starterkit-drops-7/blob/master/sites/default/default.civicrm.settings.php. You’ll need to probably change the path since you’re probably installing civicrm module in sites/all/modules rather than profiles/civicrmstarterkit/modules.

I have installed the Starter Kit on Pantheon, but keep getting the this error:

Seems to be something in the Sites URL section of the settings file:

if (!defined(‘CIVICRM_UF_BASEURL’)) {
// Detect if is Pantheon server
if (!empty(_SERVER['HTTP_X_FORWARDED_PROTO'])) { define('CIVICRM_UF_BASEURL', _SERVER[‘HTTP_X_FORWARDED_PROTO’] . ‘://’ . _SERVER['HTTP_X_FORWARDED_HOST'] . '/'); } else { define('CIVICRM_UF_BASEURL', _SERVER[‘HTTP_X_PROTO’] . $_SERVER[‘HTTP_HOST’] . ‘/’);
}
}

Am I supposed to change some code here?

Any resolution? I haven’t seen this in a while so didn’t see @ose.ts had issues. I could see if there’s any way I could help.