CRM Open Source Business & Social CRM Software

Results 1 to 3 of 3

Thread: System Configuration: config.php and config_override.php

  1. #1
    Jacob's Avatar
    Jacob is offline Senior Member
    Join Date
    Oct 2004
    Posts
    331

    Default System Configuration: config.php and config_override.php

    There are two main files involved in configuring sugar's system settings.

    config.php (located in the root of the application folder) is intended to provide general system settings. Several years ago, before our new upgrade wizard, people were unzipping patches on their production systems. This file was particularly vulnerable.

    config_override.php (also located in the root of the application folder) is intended to provide overrides for values in config.php and also allow for machine specific settings.

    Consider a simple setup that consists of two copies of Sugar, one for development and one for production. If you put your database credentials (which would be different between the two) in the appropriate config_override.php file, then you can safely copy config.php along with all of the base settings over the production config.php.

    This two file scheme makes it easier to manage server specific configurations without having to edit files. When Sugar is loaded, config.php is loaded first, then if config_override.php is present, it is loaded. It does have one drawback. If you are looking at a nice pretty setting in config.php and you want to change it, you need to make sure that config_override.php is where it is set or that it is not set in config_override.php. If the setting is in config_override.php and you modify config.php only then your shiny new setting will be blown away when config_override.php is read. I have had several occasions where I modified a setting, reran a test, and then put the setting back only to realize that the setting had no effect at all because someone had placed a value for that setting in config_override.php.

    Going forward, I expect that more and more settings will be stored in the database.

    Jacob
    Last edited by Jacob; 2007-03-07 at 05:13 PM. Reason: added a minor note

  2. #2
    lvangool is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Near Rotterdam, Holland
    Posts
    280

    Default Re: System Configuration: config.php and config_override.php

    1: why are there configuration possibilities which are not listed in the config files?
    2: if you move the configuration to the database, will you use the same encoding that you use to save user preferences? It's quite annoying I must say, when some client asks you to "set the preferences for all users to xyz" and you can't do it...

  3. #3
    Jacob's Avatar
    Jacob is offline Senior Member
    Join Date
    Oct 2004
    Posts
    331

    Default Re: System Configuration: config.php and config_override.php

    Server configuration settings should be much simpler than user preferences. There are a lot less of them.

    We have thought about making it easier to adjust user preferences en mass, or to perform a partial reset of user preferences. If we see a good chance to get these changes in we will.

    Thanks.
    Jacob

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 2009-12-02, 05:04 PM
  2. Big Security worries with Sugar!
    By mycrmspacegunnar in forum General Discussion
    Replies: 28
    Last Post: 2007-07-29, 06:27 AM
  3. Empty config.php at the end of install
    By aemadrid in forum Help
    Replies: 2
    Last Post: 2005-08-01, 07:29 PM
  4. 3.0 Portal Home (default page) Configuration
    By gatezone in forum General Discussion
    Replies: 3
    Last Post: 2005-06-17, 12:36 AM
  5. config.php in distribution DOESN'T WORK
    By davecampbell in forum Help
    Replies: 8
    Last Post: 2004-10-29, 09:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •