Last active
August 29, 2015 14:00
-
-
Save welly/5e83885ad094b1bdca01 to your computer and use it in GitHub Desktop.
Standard minimised Civicrm settings file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define( 'CIVICRM_UF', 'Drupal' ); | |
define( 'CIVICRM_UF_DSN', 'mysql://' . $_SERVER['DB_USER'] . ':' . $_SERVER['DB_PASS'] . '@' . $_SERVER['DB_HOST'] . '/' . $_SERVER['DB_NAME'] . '?new_link=true'); | |
define( 'CIVICRM_DSN', 'mysql://' . $_SERVER['DB_CIVIUSER'] . ':' . $_SERVER['DB_CIVIPASS'] . '@' . $_SERVER['DB_CIVIHOST'] . '/' . $_SERVER['DB_CIVINAME'] . '?new_link=true' ); | |
define('CIVICRM_LOGGING_DSN', CIVICRM_DSN); | |
global $civicrm_root; | |
$site_root = '/Users/alastair/dev/clients/chagos/httdocs'; | |
$civicrm_root = $site_root . '/sites/all/modules/civicrm'; | |
define( 'CIVICRM_TEMPLATE_COMPILEDIR', $site_root . 'sites/default/files/civicrm/templates_c/'); | |
$base_root = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http'; | |
$base_url = $base_root .= '://'. $_SERVER['HTTP_HOST']; | |
define( 'CIVICRM_UF_BASEURL', $base_url); | |
define( 'CIVICRM_SITE_KEY', '5c895b919c93dd5eeae6a97f9b880b4b' ); | |
define( 'CIVICRM_IDS_ENABLE', 1); | |
define( 'CIVICRM_MAIL_SMARTY', 0 ); | |
define( 'CIVICRM_DOMAIN_ID', 1 ); | |
define( 'CIVICRM_USE_MEMCACHE', 0 ); | |
define( 'CIVICRM_MEMCACHE_HOST', 'localhost' ); | |
define( 'CIVICRM_MEMCACHE_PORT', 11211 ); | |
define( 'CIVICRM_MEMCACHE_TIMEOUT', 3600 ); | |
define( 'CIVICRM_MEMCACHE_PREFIX', '' ); | |
$include_path = '.' . PATH_SEPARATOR . | |
$civicrm_root . PATH_SEPARATOR . | |
$civicrm_root . DIRECTORY_SEPARATOR . 'packages' . PATH_SEPARATOR . | |
get_include_path( ); | |
set_include_path( $include_path ); | |
if ( function_exists( 'variable_get' ) && variable_get('clean_url', '0') != '0' ) { | |
define( 'CIVICRM_CLEANURL', 1 ); | |
} else { | |
define( 'CIVICRM_CLEANURL', 0 ); | |
} | |
// force PHP to auto-detect Mac line endings | |
ini_set('auto_detect_line_endings', '1'); | |
// make sure the memory_limit is at least 64 MB | |
$memLimitString = trim(ini_get('memory_limit')); | |
$memLimitUnit = strtolower(substr($memLimitString, -1)); | |
$memLimit = (int) $memLimitString; | |
switch ($memLimitUnit) { | |
case 'g': $memLimit *= 1024; | |
case 'm': $memLimit *= 1024; | |
case 'k': $memLimit *= 1024; | |
} | |
if ($memLimit >= 0 and $memLimit < 134217728) { | |
ini_set('memory_limit', '128M'); | |
} | |
require_once 'CRM/Core/ClassLoader.php'; | |
CRM_Core_ClassLoader::singleton()->register(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment