CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • How to override settings from the civicrm.settings.php?
Pages: [1]

Author Topic: How to override settings from the civicrm.settings.php?  (Read 560 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
How to override settings from the civicrm.settings.php?
January 31, 2014, 04:06:57 am
Hi,

I know there is a trick, and I can't find it anymore.

It's in the wiki somewhere, isn't it? Can someone share the link for those that are search disabled?

And can I add it (as a comment) in the setting template so we can find directly what to update when needed?

Specifically, what I'm trying to achieve is an easier workflow to prod->staging. I need to copy regularly the prod db to staging, and it always needs change to fix
- path for extensions
- url for extensions
- url for resources
- smtp setting
- disable the cronjob for fetching bouncess

Not sure the alter can be achieved directly, but the top 3 would already be awesome to have directly working.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

kreynen

  • I post occasionally
  • **
  • Posts: 105
  • Karma: 8
Re: How to override settings from the civicrm.settings.php?
January 31, 2014, 04:21:11 am
http://wiki.civicrm.org/confluence/display/CRMDOC/Override+CiviCRM+Settings

Is thst what you are looking for?

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: How to override settings from the civicrm.settings.php?
January 31, 2014, 09:40:09 am
Another idea - what about adding conditionals into the file. It is a php file after all, so you could put if statements in there depending on your server path.
Try asking your question on the new CiviCRM help site.

kreynen

  • I post occasionally
  • **
  • Posts: 105
  • Karma: 8
Re: How to override settings from the civicrm.settings.php?
February 05, 2014, 07:49:44 am
I'm not sure which version of which CMS you are using, but you can see how we handle this with the $_SERVER variables from the Pressflow fork of Drupal in https://drupal.org/files/issues/2082713-pantheon-settings-4-4-3.patch

We've modified the template for civicrm.settings.php so that new installs on Pressflow/Pantheon that have the $_SERVER variables set use those.

You also get a peak at how Pantheon is approaching this with WordPress as well in this PR that went to the wrong upstream repo https://github.com/WordPress/WordPress/pull/41

And how they are suggesting it be implemented in Backdrop...

https://github.com/backdrop/backdrop-issues/issues/90

I know this $_SERVER is in D8.  Not sure if there is a similar option in Joomla.


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • How to override settings from the civicrm.settings.php?

This forum was archived on 2017-11-26.