Skip to content

Instantly share code, notes, and snippets.

@welly
Forked from benclark/local.settings.php
Created April 11, 2014 16:14

Revisions

  1. @benclark benclark revised this gist Aug 6, 2013. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions local.settings.php
    Original file line number Diff line number Diff line change
    @@ -75,6 +75,10 @@
    // Lower the search indexing per cron run to prevent long cron runs
    $conf['search_cron_limit'] = 5;

    // Reverse proxy
    $conf['reverse_proxy'] = TRUE;
    $conf['reverse_proxy_addresses'] = array('127.0.0.1');

    // Disable preprocessing of CSS and JS.
    $conf['preprocess_css'] = 0;
    $conf['preprocess_js'] = 0;
  2. @benclark benclark revised this gist Aug 10, 2012. 1 changed file with 19 additions and 12 deletions.
    31 changes: 19 additions & 12 deletions local.settings.php
    Original file line number Diff line number Diff line change
    @@ -1,23 +1,23 @@
    <?php
    /**
    * @file
    * local.settings.php
    *
    * local.settings.php (Drupal 6.x)
    *
    * This settings file is intended to contain settings specific to a local
    * development environment, by overriding options set in settings.php.
    *
    *
    * Include this file from your regular settings.php by including this at the
    * bottom:
    *
    *
    * @include('local.settings.php');
    *
    *
    * Placing this at the very end of settings.php will allow you override all
    * options that are set there. Prefixing it with the @ suppresses warnings if
    * the local.settings.php file is missing, so you can commit this to your repo.
    */

    // Toggle the use of memcache.
    $_use_memcache = TRUE;
    $_use_memcache = FALSE;

    // Toggle the output of devel debugging/logging.
    $_use_devel = FALSE;
    @@ -29,7 +29,12 @@
    $_db_name = 'dbname';

    // Database configuration.
    $db_url = 'mysqli://root:root@debianvm/' . $_db_name;
    if (is_array($db_url)) {
    $db_url['default'] = 'mysqli://root:root@debianvm/' . $_db_name;
    }
    else {
    $db_url = 'mysqli://root:root@debianvm/' . $_db_name;
    }

    // Allow anyone to run update.php.
    $update_free_access = FALSE;
    @@ -40,11 +45,11 @@
    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

    // Note that these options can also be moved into index.php, so that errors
    // that occur before settings.php is processed will also be reported.
    // that occur before settings.php will also be reported.
    ini_set('display_errors', TRUE);
    ini_set('display_startup_errors', TRUE);

    // Fixes for fast_404 module under lighttpd.
    // Fix for fast_404 module under lighttpd.
    $_SERVER['QUERY_STRING'] = preg_replace('/&$/i', '', $_SERVER['QUERY_STRING']);

    // Prep the $conf array.
    @@ -68,7 +73,7 @@
    $conf['uc_payment_credit_gateway'] = 'test_gateway';

    // Lower the search indexing per cron run to prevent long cron runs
    $conf['search_cron_limit'] = '10';
    $conf['search_cron_limit'] = 5;

    // Disable preprocessing of CSS and JS.
    $conf['preprocess_css'] = 0;
    @@ -102,12 +107,14 @@
    if ($_use_devel) {
    $conf['dev_query'] = 1;
    $conf['devel_query_display'] = 1;
    $conf['devel_query_sort'] = 0;
    $conf['devel_execution'] = 5;
    $conf['devel_store_queries'] = 0;
    $conf['devel_store_random'] = 1;
    $conf['devel_redirect_page'] = 0;

    // Enable xhprof profiling of each page request.
    $conf['devel_xhprof_enabled'] = 0;
    $conf['devel_xhprof_directory'] = "/var/www/xhprof";
    $conf['devel_xhprof_url'] = "http://debianvm/xhprof/xhprof_html";
    $conf['devel_redirect_page'] = 0;
    $conf['devel_query_sort'] = "0";
    }
  3. @benclark benclark revised this gist Mar 1, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion local.settings.php
    Original file line number Diff line number Diff line change
    @@ -81,7 +81,7 @@

    // Use memcache if available & enabled.
    $_memcache_inc = $_contrib_path . '/memcache/memcache.inc';
    if ($use_memcache && is_file($_memcache_inc)) {
    if ($_use_memcache && is_file($_memcache_inc)) {
    // Configure memcache locally
    $conf['memcache_servers'] = array(
    'debianvm:11211' => 'default',
  4. @benclark benclark revised this gist Feb 29, 2012. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions local.settings.php
    Original file line number Diff line number Diff line change
    @@ -56,7 +56,7 @@
    // prevent accidental email sends from a development site.
    // Make sure you adjust this value if the Devel module is located elsewhere
    $_smtp_library = $_contrib_path . '/devel/devel.module';
    if (file_exists($_smtp_library)) {
    if (is_file($_smtp_library)) {
    $conf['smtp_library'] = $_smtp_library;
    }

    @@ -81,7 +81,7 @@

    // Use memcache if available & enabled.
    $_memcache_inc = $_contrib_path . '/memcache/memcache.inc';
    if (file_exists($_memcache_inc) && $_use_memcache) {
    if ($use_memcache && is_file($_memcache_inc)) {
    // Configure memcache locally
    $conf['memcache_servers'] = array(
    'debianvm:11211' => 'default',
    @@ -93,16 +93,18 @@
    $conf['cache_inc'] = $_memcache_inc;
    }
    else {
    // Revert to Drupal core caching in case settings.php
    // is configured to use Memcache.
    $conf['cache_inc'] = 'includes/cache.inc';
    }

    // Devel settings
    if ($_use_devel) {
    $conf['dev_query'] = 1;
    $conf['devel_query_display'] = 1;
    $conf['devel_execution'] = "5";
    $conf['devel_execution'] = 5;
    $conf['devel_store_queries'] = 0;
    $conf['devel_store_random'] = "1";
    $conf['devel_store_random'] = 1;
    $conf['devel_xhprof_enabled'] = 0;
    $conf['devel_xhprof_directory'] = "/var/www/xhprof";
    $conf['devel_xhprof_url'] = "http://debianvm/xhprof/xhprof_html";
  5. @benclark benclark revised this gist Jan 30, 2012. 1 changed file with 23 additions and 12 deletions.
    35 changes: 23 additions & 12 deletions local.settings.php
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,12 @@
    * the local.settings.php file is missing, so you can commit this to your repo.
    */

    // Toggle the use of memcache.
    $_use_memcache = TRUE;

    // Toggle the output of devel debugging/logging.
    $_use_devel = FALSE;

    // Path where all contrib modules can be found.
    $_contrib_path = 'sites/all/modules/contrib';

    @@ -73,9 +79,9 @@
    $conf['environment_indicator_text'] = 'LOCAL DEVELOPMENT';
    $conf['environment_indicator_color'] = 'dark-red';

    // Use memcache if available.
    // Use memcache if available & enabled.
    $_memcache_inc = $_contrib_path . '/memcache/memcache.inc';
    if (file_exists($_memcache_inc)) {
    if (file_exists($_memcache_inc) && $_use_memcache) {
    // Configure memcache locally
    $conf['memcache_servers'] = array(
    'debianvm:11211' => 'default',
    @@ -86,15 +92,20 @@
    $conf['memcache_key_prefix'] = $_db_name;
    $conf['cache_inc'] = $_memcache_inc;
    }
    else {
    $conf['cache_inc'] = 'includes/cache.inc';
    }

    // Devel settings
    #$conf['dev_query'] = 1;
    #$conf['devel_query_display'] = 1;
    #$conf['devel_execution'] = "5";
    #$conf['devel_store_queries'] = 0;
    #$conf['devel_store_random'] = "1";
    #$conf['devel_xhprof_enabled'] = 0;
    #$conf['devel_xhprof_directory'] = "/var/www/xhprof";
    #$conf['devel_xhprof_url'] = "http://debianvm/xhprof/xhprof_html";
    #$conf['devel_redirect_page'] = 0;
    #$conf['devel_query_sort'] = "0";
    if ($_use_devel) {
    $conf['dev_query'] = 1;
    $conf['devel_query_display'] = 1;
    $conf['devel_execution'] = "5";
    $conf['devel_store_queries'] = 0;
    $conf['devel_store_random'] = "1";
    $conf['devel_xhprof_enabled'] = 0;
    $conf['devel_xhprof_directory'] = "/var/www/xhprof";
    $conf['devel_xhprof_url'] = "http://debianvm/xhprof/xhprof_html";
    $conf['devel_redirect_page'] = 0;
    $conf['devel_query_sort'] = "0";
    }
  6. @benclark benclark revised this gist Jan 23, 2012. 1 changed file with 0 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions local.settings.php
    Original file line number Diff line number Diff line change
    @@ -68,9 +68,6 @@
    $conf['preprocess_css'] = 0;
    $conf['preprocess_js'] = 0;

    // Disable securepages.
    $conf['securepages_enable'] = 0;

    // Use environment indicator, if available.
    $conf['environment_indicator_enabled'] = TRUE;
    $conf['environment_indicator_text'] = 'LOCAL DEVELOPMENT';
  7. @benclark benclark revised this gist Jan 23, 2012. 1 changed file with 59 additions and 7 deletions.
    66 changes: 59 additions & 7 deletions local.settings.php
    Original file line number Diff line number Diff line change
    @@ -16,26 +16,43 @@
    * the local.settings.php file is missing, so you can commit this to your repo.
    */

    $db_url = 'mysqli://user:pass@localhost/dbname';
    // Path where all contrib modules can be found.
    $_contrib_path = 'sites/all/modules/contrib';

    // Allow anyone to run update.php, so that you don't have to log in with uid=1
    // to do so
    $update_free_access = TRUE;
    // The name of the database. This will also be used as the memcache prefix.
    $_db_name = 'dbname';

    // Database configuration.
    $db_url = 'mysqli://root:root@debianvm/' . $_db_name;

    // Allow anyone to run update.php.
    $update_free_access = FALSE;

    // Set error reporting level to ignore notices and deprecated warnings. These
    // should be turned back on during development to clean up any code that
    // generates them.
    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

    // Note that these options can also be moved into index.php, so that errors
    // that occur before settings.php is processed will also be reported.
    ini_set('display_errors', TRUE);
    ini_set('display_startup_errors', TRUE);

    // Fixes for fast_404 module under lighttpd.
    $_SERVER['QUERY_STRING'] = preg_replace('/&$/i', '', $_SERVER['QUERY_STRING']);

    // Prep the $conf array.
    if (!is_array($conf)) {
    $conf = array();
    }

    // Save email messages to the log instead of sending them out. This is to
    // prevent accidental email sends from a development site.
    // Make sure you adjust this value if the Devel module is located elsewhere
    $conf['smtp_library'] = 'sites/all/modules/contrib/devel/devel.module';
    $_smtp_library = $_contrib_path . '/devel/devel.module';
    if (file_exists($_smtp_library)) {
    $conf['smtp_library'] = $_smtp_library;
    }

    // Disable Secure Pages and Secure Site module functionality
    $conf['securepages_enable'] = 0;
    @@ -47,5 +64,40 @@
    // Lower the search indexing per cron run to prevent long cron runs
    $conf['search_cron_limit'] = '10';

    // Use the core cache, instead of memcache or any others
    $conf['cache_inc'] = './includes/cache.inc';
    // Disable preprocessing of CSS and JS.
    $conf['preprocess_css'] = 0;
    $conf['preprocess_js'] = 0;

    // Disable securepages.
    $conf['securepages_enable'] = 0;

    // Use environment indicator, if available.
    $conf['environment_indicator_enabled'] = TRUE;
    $conf['environment_indicator_text'] = 'LOCAL DEVELOPMENT';
    $conf['environment_indicator_color'] = 'dark-red';

    // Use memcache if available.
    $_memcache_inc = $_contrib_path . '/memcache/memcache.inc';
    if (file_exists($_memcache_inc)) {
    // Configure memcache locally
    $conf['memcache_servers'] = array(
    'debianvm:11211' => 'default',
    );
    $conf['memcache_bins'] = array(
    'cache' => 'default',
    );
    $conf['memcache_key_prefix'] = $_db_name;
    $conf['cache_inc'] = $_memcache_inc;
    }

    // Devel settings
    #$conf['dev_query'] = 1;
    #$conf['devel_query_display'] = 1;
    #$conf['devel_execution'] = "5";
    #$conf['devel_store_queries'] = 0;
    #$conf['devel_store_random'] = "1";
    #$conf['devel_xhprof_enabled'] = 0;
    #$conf['devel_xhprof_directory'] = "/var/www/xhprof";
    #$conf['devel_xhprof_url'] = "http://debianvm/xhprof/xhprof_html";
    #$conf['devel_redirect_page'] = 0;
    #$conf['devel_query_sort'] = "0";
  8. @brockboland brockboland revised this gist Jan 22, 2012. 1 changed file with 17 additions and 0 deletions.
    17 changes: 17 additions & 0 deletions local.settings.php
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,21 @@
    <?php
    /**
    * @file
    * local.settings.php
    *
    * This settings file is intended to contain settings specific to a local
    * development environment, by overriding options set in settings.php.
    *
    * Include this file from your regular settings.php by including this at the
    * bottom:
    *
    * @include('local.settings.php');
    *
    * Placing this at the very end of settings.php will allow you override all
    * options that are set there. Prefixing it with the @ suppresses warnings if
    * the local.settings.php file is missing, so you can commit this to your repo.
    */

    $db_url = 'mysqli://user:pass@localhost/dbname';

    // Allow anyone to run update.php, so that you don't have to log in with uid=1
  9. @brockboland brockboland revised this gist Jan 22, 2012. 1 changed file with 12 additions and 3 deletions.
    15 changes: 12 additions & 3 deletions local.settings.php
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,24 @@
    <?php
    $db_url = 'mysqli://user:pass@localhost/dbname';
    $update_free_access = TRUE;

    // Allow anyone to run update.php, so that you don't have to log in with uid=1
    // to do so
    $update_free_access = TRUE;

    // Set error reporting level to ignore notices and deprecated warnings. These
    // should be turned back on during development to clean up any code that
    // generates them.
    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
    // Note that these options can also be moved into index.php, so that errors
    // that occur before settings.php is processed will also be reported.
    ini_set('display_errors', TRUE);
    ini_set('display_startup_errors', TRUE);


    // Only log email messages
    $conf['smtp_library'] = 'sites/all/modules/devel/devel.module';
    // Save email messages to the log instead of sending them out. This is to
    // prevent accidental email sends from a development site.
    // Make sure you adjust this value if the Devel module is located elsewhere
    $conf['smtp_library'] = 'sites/all/modules/contrib/devel/devel.module';

    // Disable Secure Pages and Secure Site module functionality
    $conf['securepages_enable'] = 0;
  10. @brockboland brockboland created this gist Jan 18, 2012.
    25 changes: 25 additions & 0 deletions local.settings.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    <?php
    $db_url = 'mysqli://user:pass@localhost/dbname';
    $update_free_access = TRUE;


    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
    ini_set('display_errors', TRUE);
    ini_set('display_startup_errors', TRUE);


    // Only log email messages
    $conf['smtp_library'] = 'sites/all/modules/devel/devel.module';

    // Disable Secure Pages and Secure Site module functionality
    $conf['securepages_enable'] = 0;
    $conf['securesite_enabled'] = 0;

    // Use a test payment gateway to prevent real transactions
    $conf['uc_payment_credit_gateway'] = 'test_gateway';

    // Lower the search indexing per cron run to prevent long cron runs
    $conf['search_cron_limit'] = '10';

    // Use the core cache, instead of memcache or any others
    $conf['cache_inc'] = './includes/cache.inc';