Advertisement
HyperGlide

cat global.inc -- Oct 15 15:30

Oct 25th, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.22 KB | None | 0 0
  1. <?php # global settings.php
  2.  
  3. error_reporting(0); // disable reporting errors by default - enable later only for "dev" subdomains
  4.  
  5. if (isset($_SERVER['HTTP_HOST']) && empty($cookie_domain)) {
  6. $domain = '.'. preg_replace('`^www.`', '', $_SERVER['HTTP_HOST']);
  7. if (count(explode('.', $domain)) > 2) {
  8. @ini_set('session.cookie_domain', $domain);
  9. $cookie_domain = $domain;
  10. }
  11. }
  12.  
  13. $cookie_domain = str_replace('..', '.', $cookie_domain);
  14. header("X-Cookie-Domain: " . $cookie_domain);
  15.  
  16. // Fix for Mollom, CloudFlare and others running via Proxy.
  17. if (isset($_SERVER['REMOTE_ADDR'])) {
  18. if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
  19. $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
  20. }
  21. if (isset($_SERVER['HTTP_X_REAL_IP'])) {
  22. $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP'];
  23. }
  24. if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
  25. $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
  26. }
  27. }
  28.  
  29. $conf['page_compression'] = 0; // required in Nginx, since it already compresses everything
  30. $conf['boost_crawl_on_cron'] = 0; // deny Boost crawler
  31. $conf['cron_safe_threshold'] = 0; // disable poormanscron
  32. $conf['preprocess_css'] = 1; // enable hardcoded css aggregation
  33. $conf['preprocess_js'] = 1; // enable hardcoded js aggregation
  34. $conf['file_downloads'] = 1; // force public downloads by default
  35. $conf['error_level'] = 0; // disable errors on screen
  36. $conf['statistics_enable_access_log'] = 0; // disable access log stats
  37. $conf['allow_authorize_operations'] = FALSE; // disable insecure plugin manager
  38. $conf['admin_menu_cache_client'] = FALSE; // disable caching in admin_menu
  39. $conf['boost_ignore_htaccess_warning'] = 1; // silence false alarm in Boost
  40. $conf['expire_flush_front'] = 1; // default settings for expire module
  41. $conf['expire_flush_node_terms'] = 1; // default settings for expire module
  42. $conf['expire_flush_menu_items'] = 0; // default settings for expire module
  43. $conf['expire_flush_cck_references'] = 0; // default settings for expire module
  44. $conf['expire_include_base_url'] = 1; // default settings for expire module
  45. $conf['video_ffmpeg_instances'] = 1; // force safe default for ffmpeg
  46. $conf['securepages_enable'] = 1; // force to avoid issues with SSL proxy
  47.  
  48. ini_set('session.cookie_lifetime', 86400); // set it to 24 hours max
  49. ini_set('session.cache_expire', 86400); // set it also to 24 hours max
  50. ini_set('session.gc_maxlifetime', 86400); // set it also to 24 hours max
  51. // Improve sessions management if module session_expire and/or Pressflow core is not used.
  52. // It is already enabled in the php.ini, but we are forcing it here, just in case.
  53. ini_set('session.gc_probability', 1);
  54. ini_set('session.gc_divisor', 1000);
  55.  
  56. if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/(?:crawl|goog|yahoo|yandex|spider|bot|tracker|click|parser)/i", $_SERVER['HTTP_USER_AGENT'])) {
  57. // detect known bots
  58. $known_bot = 'bot';
  59. }
  60.  
  61. // New Relic - see: https://newrelic.com/docs/php/per-directory-settings#perdir-rollup
  62. if (isset($_SERVER['DOCUMENT_ROOT']) && isset($_SERVER['SERVER_NAME'])) {
  63. $frags = explode("/", $_SERVER['DOCUMENT_ROOT']);
  64. if ($frags[1] == 'data') {
  65. $this_instance = 'Site: ' . $_SERVER['SERVER_NAME'] . ';AAA Octopus ' . $frags[3] . ';AAA All Instances';
  66. }
  67. elseif ($frags[2] == 'aegir') {
  68. $this_instance = 'Site: ' . $_SERVER['SERVER_NAME'] . ';AAA Barracuda Master;AAA All Instances';
  69. }
  70. ini_set('newrelic.appname', $this_instance);
  71. ini_set('newrelic.framework', 'drupal');
  72. if (extension_loaded('newrelic')) {
  73. newrelic_set_appname($this_instance);
  74. }
  75. }
  76.  
  77. if ($conf['install_profile'] == 'hostmaster' && isset($_SERVER['HTTP_USER_AGENT'])) {
  78. if (!file_exists('/data/conf/no-https-aegir.inc')) {
  79. $request_type = ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || $_SERVER['HTTPS'] == 'on') ? 'SSL' : 'NONSSL';
  80. if ($request_type != "SSL" && !preg_match("/^\/cron\.php/", $_SERVER['REQUEST_URI'])) { // we force secure connection here
  81. header('X-Accel-Expires: 5');
  82. header("HTTP/1.1 301 Moved Permanently");
  83. header("Location: https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
  84. }
  85. }
  86. $conf['hosting_require_disable_before_delete'] = 0;
  87. unset($conf['cache']); // disable hardcoded caching
  88. ini_set('session.cookie_lifetime', 0); // force log-out on browser quit
  89. if (preg_match("/(?:host8|omega8|aegir\.cc)/i", $_SERVER['HTTP_HOST'])) {
  90. if (preg_match("/^\/admin\/user\/user\/create/", $_SERVER['REQUEST_URI']) ||
  91. preg_match("/^\/node\/add\/server/", $_SERVER['REQUEST_URI']) ||
  92. preg_match("/^\/node\/(?:1|2|4|5|7|8|10)\/(?:edit|delete)/", $_SERVER['REQUEST_URI'])) {
  93. header('X-Accel-Expires: 5');
  94. header("HTTP/1.1 301 Moved Permanently");
  95. header("Location: https://" . $_SERVER['HTTP_HOST'] . "/hosting/sites");
  96. }
  97. }
  98. header('X-Accel-Expires: 1');
  99. }
  100.  
  101. $drupal_eight = FALSE;
  102. $drupal_seven = FALSE;
  103. $drupal_six = FALSE;
  104. $drupal_five = FALSE;
  105. $use_redis = FALSE;
  106. $force_redis = FALSE;
  107. $redis_up = FALSE;
  108. $is_cart = FALSE;
  109. $is_dev = FALSE;
  110. $high_traffic = FALSE;
  111. $da_inc = FALSE;
  112.  
  113. /**
  114. * Optional extra settings
  115. *
  116. */
  117. if (file_exists('/data/conf/settings.global.inc')) {
  118. require_once "/data/conf/settings.global.inc";
  119. }
  120.  
  121. if (file_exists('./web.config')) {
  122. if (file_exists('./core')) {
  123. $conf['cache'] = 1; // enable hardcoded standard caching - Drupal 8
  124. $drupal_eight = TRUE;
  125. header('X-Backend: A');
  126. }
  127. else {
  128. $conf['cache'] = 0; // disable standard db caching - Drupal 7
  129. $drupal_seven = TRUE;
  130. $use_redis = TRUE;
  131. header('X-Backend: B');
  132. }
  133. }
  134. elseif (file_exists('./modules/path_alias_cache')) {
  135. $conf['cache'] = 0; // disable standard db caching - Pressflow 6
  136. $drupal_six = TRUE;
  137. $use_redis = TRUE;
  138. header('X-Backend: C');
  139. }
  140. elseif (file_exists('./modules/watchdog')) {
  141. $conf['cache'] = 1; // enable hardcoded standard caching - Pressflow 5
  142. $drupal_five = TRUE;
  143. header('X-Backend: D');
  144. }
  145. else {
  146. $conf['cache'] = 1; // enable hardcoded standard caching
  147. $drupal_unknown = TRUE;
  148. header('X-Backend: E');
  149. }
  150.  
  151. // http://drupal.org/node/912682#comment-3503636
  152. if ($conf['install_profile'] == 'managingnews') {
  153. ini_set('auto_detect_line_endings', TRUE);
  154. }
  155.  
  156. // JS aggregation breaks jquery.autopager-1.0.0.js
  157. if ($conf['install_profile'] == 'martplug') {
  158. unset($conf['preprocess_js']); // disable hardcoded js aggregation
  159. }
  160.  
  161. if (isset($_SERVER['SERVER_NAME'])) {
  162. if ($conf['install_profile'] == 'uberdrupal' ||
  163. $conf['install_profile'] == 'martplug' ||
  164. $conf['install_profile'] == 'commerce' ||
  165. $conf['install_profile'] == 'commerce_kickstart' ||
  166. $conf['install_profile'] == 'opendeals' ||
  167. file_exists('sites/all/modules/ubercart/README.txt') ||
  168. file_exists('profiles/' . $conf['install_profile'] . '/modules/ubercart/README.txt') ||
  169. file_exists('profiles/' . $conf['install_profile'] . '/modules/contrib/ubercart/README.txt') ||
  170. file_exists('sites/'. $_SERVER['SERVER_NAME'] .'/modules/ubercart/README.txt')) {
  171. unset($conf['file_downloads']); // disable hardcoded public downloads
  172. $is_cart = TRUE;
  173. header('X-Is-Cart: YES');
  174. }
  175. }
  176.  
  177. if (isset($_SERVER['HTTP_HOST']) && preg_match("/(?:dev\.|devel\.)/i", $_SERVER['HTTP_HOST']) && isset($_SERVER['HTTP_USER_AGENT'])) {
  178. // deny known search bots on dev subdomains
  179. if (!empty($known_bot)) {
  180. header('X-Accel-Expires: 5');
  181. header("HTTP/1.1 301 Moved Permanently");
  182. header("Location: http://www.aegirproject.org/");
  183. }
  184. error_reporting(E_ALL & ~E_NOTICE);
  185. ini_set('display_errors', TRUE);
  186. ini_set('display_startup_errors', TRUE);
  187. unset($conf['cache']); // stop hardcoding caching
  188. unset($conf['preprocess_css']); // stop hardcoding css aggregation
  189. unset($conf['preprocess_js']); // stop hardcoding js aggregation
  190. unset($conf['error_level']); // stop hardcoding no errors on screen
  191. $conf['xmlsitemap_submit'] = 0; // disable XML Sitemap for dev.domain
  192. $conf['xmlsitemap_update'] = 0; // disable XML Sitemap for dev.domain
  193. $is_dev = TRUE;
  194. }
  195.  
  196. if (isset($_SERVER['HTTP_HOST']) && preg_match("/host8/i", $_SERVER['HTTP_HOST'])) {
  197. // deny known search bots on host8 subdomains
  198. if (!empty($known_bot)) {
  199. header('X-Accel-Expires: 5');
  200. header("HTTP/1.1 301 Moved Permanently");
  201. header("Location: http://omega8.cc/");
  202. }
  203. }
  204.  
  205. if (isset($_SERVER['HTTP_HOST']) && isset($_SERVER['SERVER_NAME'])) {
  206.  
  207. if (isset($_SERVER['HTTP_USER_AGENT']) && isset($_SERVER['USER_DEVICE'])) {
  208. $this_device = $_SERVER['USER_DEVICE'];
  209. }
  210. else {
  211. $this_device = 'normal';
  212. }
  213.  
  214. if (file_exists('sites/all/modules/domain/settings.inc')) {
  215. $da_inc = 'sites/all/modules/domain/settings.inc';
  216. }
  217. elseif (file_exists('profiles/' . $conf['install_profile'] . '/modules/domain/settings.inc')) {
  218. $da_inc = 'profiles/' . $conf['install_profile'] . '/modules/domain/settings.inc';
  219. }
  220. elseif (file_exists('profiles/' . $conf['install_profile'] . '/modules/contrib/domain/settings.inc')) {
  221. $da_inc = 'profiles/' . $conf['install_profile'] . '/modules/contrib/domain/settings.inc';
  222. }
  223.  
  224. if ($da_inc) {
  225. $this_prefix = $_SERVER['HTTP_HOST'] . '.';
  226. }
  227. else {
  228. $this_prefix = $_SERVER['SERVER_NAME'] . '.';
  229. }
  230.  
  231. if (file_exists('sites/all/modules/advagg/advagg_bundler/advagg_bundler.module') ||
  232. file_exists('sites/'. $_SERVER['SERVER_NAME'] .'/modules/advagg/advagg_bundler/advagg_bundler.module') ||
  233. file_exists('profiles/' . $conf['install_profile'] . '/modules/advagg/advagg_bundler/advagg_bundler.module') ||
  234. file_exists('profiles/' . $conf['install_profile'] . '/modules/contrib/advagg/advagg_bundler/advagg_bundler.module')) {
  235. $conf['preprocess_css'] = 0; // css aggregation disabled
  236. $conf['preprocess_js'] = 0; // js aggregation disabled
  237. $conf['advagg_aggregate_mode'] = 1;
  238. $conf['advagg_async_generation'] = 0;
  239. $conf['advagg_checksum_mode'] = "md5";
  240. $conf['advagg_closure'] = 1;
  241. $conf['advagg_css_compress_agg_files'] = 1;
  242. $conf['advagg_css_compress_compressor_level'] = "sane";
  243. $conf['advagg_css_compress_inline'] = 1;
  244. $conf['advagg_css_compressor'] = 2;
  245. $conf['advagg_debug'] = 0;
  246. $conf['advagg_dir_htaccess'] = 0;
  247. $conf['advagg_enabled'] = 1;
  248. $conf['advagg_gzip_compression'] = 1;
  249. $conf['advagg_js_compress_agg_files'] = 1;
  250. $conf['advagg_js_compress_callback'] = 1;
  251. $conf['advagg_js_compress_inline'] = 1;
  252. $conf['advagg_js_compress_packer_enable'] = 0;
  253. $conf['advagg_js_compressor'] = 1;
  254. $conf['advagg_page_cache_mode'] = 0;
  255. $conf['advagg_rebuild_on_flush'] = 0;
  256. $conf['advagg_server_addr'] = "-1";
  257. }
  258.  
  259. if (file_exists('./modules/o_contrib/purge/purge.inc')) {
  260. $conf['purge_proxy_urls'] = "http://127.0.0.1:8888/purge-normal?purge_method=get http://127.0.0.1:8888/purge-mobile-tablet?purge_method=get http://127.0.0.1:8888/purge-mobile-smart?purge_method=get http://127.0.0.1:8888/purge-mobile-other?purge_method=get";
  261. header('X-Purge-Level: 6');
  262. }
  263. elseif (file_exists('./modules/o_contrib_seven/purge/purge.inc')) {
  264. $conf['expire_flush_node_terms'] = 0; // disable this to avoid WSOD - see http://drupal.org/node/1151686#comment-5556544
  265. $conf['purge_proxy_urls'] = "http://127.0.0.1:8888/purge-normal?purge_method=get http://127.0.0.1:8888/purge-mobile-tablet?purge_method=get http://127.0.0.1:8888/purge-mobile-smart?purge_method=get http://127.0.0.1:8888/purge-mobile-other?purge_method=get";
  266. header('X-Purge-Level: 7');
  267. }
  268. else {
  269. header('X-Purge-Level: none');
  270. }
  271.  
  272. if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) || isset($_SERVER['HTTPS'])) {
  273. $conf['https'] = TRUE;
  274. $request_type = ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || $_SERVER['HTTPS'] == 'on') ? 'SSL' : 'NONSSL';
  275. if ($request_type == "SSL") { // we check for secure connection to set correct base_url
  276. $base_url = 'https://' . $_SERVER['HTTP_HOST'];
  277. if ($conf['install_profile'] != 'hostmaster') {
  278. $_SERVER['HTTPS'] = 'on';
  279. }
  280. header('X-Local-Proto: https');
  281. }
  282. else {
  283. $base_url = 'http://' . $_SERVER['HTTP_HOST'];
  284. }
  285. }
  286. else {
  287. $base_url = 'http://' . $_SERVER['HTTP_HOST'];
  288. }
  289.  
  290. if (isset($_SERVER['REQUEST_TIME']) && isset($_SERVER['REMOTE_ADDR']) && isset($_SERVER['HTTP_USER_AGENT']) &&
  291. !preg_match("/^\/esi\//", $_SERVER['REQUEST_URI'])) {
  292. $identity = $_SERVER['REQUEST_TIME'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['SERVER_NAME'] . $_SERVER['HTTP_USER_AGENT'];
  293. $identity = 'BOND'. md5("$identity");
  294.  
  295. if ($drupal_seven || $drupal_eight) {
  296. $conf['https'] = TRUE;
  297. $sess_prefix = ini_get('session.cookie_secure') ? 'SSESS' : 'SESS';
  298. $test_sess_name = $sess_prefix . substr(hash('sha256', $cookie_domain), 0, 32);
  299. unset($conf['file_downloads']); // disable hardcoded public downloads in d7
  300. }
  301. else {
  302. $test_sess_name = 'SESS'. md5($cookie_domain);
  303. }
  304.  
  305. if (!isset($_COOKIE[$test_sess_name]) && (file_exists('sites/all/modules/cache_hour/YES.txt') || $force_redis || $high_traffic ||
  306. file_exists('sites/'. $_SERVER['SERVER_NAME'] .'/modules/cache_hour/YES.txt'))) {
  307. $expire_in_seconds = '3600';
  308. }
  309.  
  310. if (empty($known_bot) && !$high_traffic) {
  311. if (preg_match("/^\/(?:user|admin|cart|checkout|logout|privatemsg)/", $_SERVER['REQUEST_URI']) ||
  312. preg_match("/\/(?:node\/[0-9]+\/edit|node\/add|comment\/reply|approve|users|ajax_comments)/", $_SERVER['REQUEST_URI']) ||
  313. preg_match("/(?:dev\.|devel\.)/", $_SERVER['HTTP_HOST'])) {
  314. if (!isset($_COOKIE[OctopusNoCacheID])) {
  315. $lifetime = '15';
  316. setcookie('OctopusNoCacheID', 'NOCACHE' . $identity, $_SERVER['REQUEST_TIME'] + $lifetime, '/', $cookie_domain);
  317. }
  318. $expire_in_seconds = '1';
  319. }
  320.  
  321. if (isset($_SERVER['HTTP_X_LOCAL_PROXY'])) {
  322. $expire_in_seconds = '1';
  323. }
  324.  
  325. if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST' && !isset($_COOKIE[OctopusNoCacheID])) {
  326. $lifetime = '15';
  327. setcookie('OctopusNoCacheID', 'POST' . $identity, $_SERVER['REQUEST_TIME'] + $lifetime, '/', $cookie_domain);
  328. $expire_in_seconds = '0';
  329. }
  330. }
  331.  
  332. if (!empty($known_bot)) {
  333. if (!preg_match("/Pingdom/i", $_SERVER['HTTP_USER_AGENT'])) {
  334. $expire_in_seconds = '3600';
  335. }
  336. }
  337.  
  338. if ($conf['install_profile'] != 'hostmaster' && !empty($expire_in_seconds)) {
  339. header("X-Accel-Expires: " . $expire_in_seconds);
  340. }
  341. }
  342. }
  343.  
  344. $use_cache = TRUE; // Standard Redis integration for 6.x and 7.x core is enabled by default.
  345.  
  346. $custom_cache = FALSE; // When set to TRUE in the /data/conf/override.global.inc file,
  347. // it will disable default Redis configuration.
  348.  
  349. $custom_fb = FALSE; // When set to TRUE in the /data/conf/override.global.inc file,
  350. // it will disable default Drupal for Facebook (fb) configuration.
  351.  
  352. $custom_da = FALSE; // When set to TRUE in the /data/conf/override.global.inc file,
  353. // it will disable default Domain Access configuration,
  354. // so you can define your own, custom configuration in the included below
  355. // /data/conf/override.global.inc file. NOTE: if set to TRUE, then you
  356. // must set to TRUE also $custom_cache and copy all its logic in your
  357. // /data/conf/override.global.inc file, because Domain Access must be included
  358. // *after* any cache-related settings to work properly.
  359.  
  360. if (file_exists('/var/run/redis.pid')) {
  361. $redis_up = TRUE;
  362. }
  363.  
  364. if (isset($_SERVER['SERVER_NAME']) && (file_exists('sites/all/modules/cache/NO.txt') ||
  365. file_exists('sites/'. $_SERVER['SERVER_NAME'] .'/modules/cache/NO.txt'))) {
  366. $use_cache = FALSE;
  367. }
  368.  
  369. if (isset($_SERVER['REQUEST_URI']) && preg_match("/(?:\/nojs\/|noredis)/", $_SERVER['REQUEST_URI'])) {
  370. $use_redis = FALSE;
  371. }
  372.  
  373. if ($redis_up && $use_cache && $use_redis && !$force_redis) {
  374. header('X-Allow-Redis: YES');
  375. }
  376. elseif ($redis_up && $force_redis) {
  377. $use_cache = TRUE;
  378. $use_redis = TRUE;
  379. header('X-Force-Redis: YES');
  380. }
  381. else {
  382. if (!$is_dev) {
  383. $conf['cache'] = 1; // enable standard db caching if redis is not allowed or not available
  384. }
  385. header('X-Allow-Redis: NO');
  386. }
  387.  
  388. if (!isset($_SERVER['HTTP_USER_AGENT'])) {
  389. $use_redis = FALSE;
  390. $use_cache = FALSE;
  391. }
  392.  
  393. /**
  394. * Optional extra overrides
  395. *
  396. */
  397. if (file_exists('/data/conf/override.global.inc')) {
  398. require_once "/data/conf/override.global.inc";
  399. }
  400.  
  401. // Use redis caching only for d6 and d7 profiles.
  402. if ($redis_up && $use_cache && $use_redis && !$custom_cache) {
  403. $cache_backport = FALSE;
  404. $cache_redis = FALSE;
  405. if (file_exists('./modules/o_contrib/cache_backport/cache.inc')) {
  406. $cache_backport = TRUE;
  407. $cache_backport_path = './modules/o_contrib/cache_backport/cache.inc';
  408. }
  409. if (file_exists('./modules/o_contrib_seven/redis/redis.autoload.inc')) {
  410. $cache_redis = TRUE;
  411. $cache_backport = FALSE;
  412. $cache_redis_path = './modules/o_contrib_seven/redis/redis.autoload.inc';
  413. $cache_lock_path = './modules/o_contrib_seven/redis/redis.lock.inc';
  414. }
  415. elseif (file_exists('./modules/o_contrib/redis/redis.autoload.inc')) {
  416. $cache_redis = TRUE;
  417. $cache_redis_path = './modules/o_contrib/redis/redis.autoload.inc';
  418. $cache_lock_path = './modules/o_contrib/redis/redis.lock.inc';
  419. }
  420. if ($cache_redis) {
  421. if ($cache_backport) {
  422. $conf['cache_inc'] = $cache_backport_path;
  423. }
  424. $conf['cache_backends'][] = $cache_redis_path;
  425. $conf['redis_client_interface'] = 'PhpRedis';
  426. $conf['redis_client_host'] = '127.0.0.1';
  427. $conf['redis_client_port'] = '6379';
  428. $conf['redis_client_password'] = 'Dgcr1O6C';
  429. $conf['cache_prefix'] = $this_prefix;
  430. $conf['page_cache_invoke_hooks'] = TRUE;
  431. $conf['page_cache_without_database'] = FALSE;
  432. $conf['page_cache_maximum_age'] = 0;
  433. $conf['page_cache_max_age'] = 0;
  434. $conf['cache_lifetime'] = 0;
  435. $conf['cache_default_class'] = 'Redis_Cache';
  436. $conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
  437. $conf['cache_class_cache_menu'] = 'DrupalDatabaseCache';
  438. $conf['cache_class_cache_pulled_tweets'] = 'DrupalDatabaseCache';
  439. $conf['cache_class_cache_views_data'] = 'DrupalDatabaseCache';
  440. $conf['cache_class_cache_views'] = 'DrupalDatabaseCache';
  441. if (!isset($_COOKIE[$test_sess_name]) || $is_cart) {
  442. $conf['cache_class_cache_block'] = 'DrupalDatabaseCache';
  443. $conf['cache_class_cache_bootstrap'] = 'DrupalDatabaseCache';
  444. $conf['cache_class_cache_tax_image'] = 'DrupalDatabaseCache';
  445. $conf['cache_class_cache'] = 'DrupalDatabaseCache';
  446. }
  447. if ($force_redis) {
  448. $conf['page_cache_without_database'] = TRUE;
  449. $conf['omit_vary_cookie'] = TRUE;
  450. $conf['cache_class_cache_block'] = 'Redis_Cache';
  451. $conf['cache_class_cache_bootstrap'] = 'Redis_Cache';
  452. $conf['cache_class_cache_menu'] = 'Redis_Cache';
  453. $conf['cache_class_cache_tax_image'] = 'Redis_Cache';
  454. $conf['cache_class_cache_views_data'] = 'Redis_Cache';
  455. $conf['cache_class_cache_views'] = 'Redis_Cache';
  456. $conf['cache_class_cache'] = 'Redis_Cache';
  457. }
  458. if ($conf['install_profile'] == 'hostmaster') {
  459. $conf['cache_class_cache'] = 'DrupalDatabaseCache';
  460. $conf['cache_class_cache_path_alias'] = 'DrupalDatabaseCache';
  461. $conf['cache_class_cache_path_source'] = 'DrupalDatabaseCache';
  462. }
  463. }
  464. }
  465.  
  466.  
  467. /**
  468. * Drupal for Facebook (fb)
  469. *
  470. * Important:
  471. * Facebook client libraries will not work properly if arg_separator.output is not &.
  472. * The default value is &amp;. Change this in settings.php. Make the value "&"
  473. * http://drupal.org/node/205476
  474. */
  475. if (!$custom_fb) {
  476. if (file_exists('sites/all/modules/fb/fb_settings.inc')) {
  477. ini_set('arg_separator.output', '&');
  478. require_once "sites/all/modules/fb/fb_settings.inc";
  479. $conf['fb_api_file'] = "sites/all/modules/fb/facebook-platform/php/facebook.php";
  480. }
  481. elseif (file_exists('profiles/' . $conf['install_profile'] . '/modules/fb/fb_settings.inc')) {
  482. ini_set('arg_separator.output', '&');
  483. require_once 'profiles/' . $conf['install_profile'] . '/modules/fb/fb_settings.inc';
  484. $conf['fb_api_file'] = 'profiles/' . $conf['install_profile'] . '/modules/fb/facebook-platform/php/facebook.php';
  485. }
  486. elseif (file_exists('profiles/' . $conf['install_profile'] . '/modules/contrib/fb/fb_settings.inc')) {
  487. ini_set('arg_separator.output', '&');
  488. require_once 'profiles/' . $conf['install_profile'] . '/modules/contrib/fb/fb_settings.inc';
  489. $conf['fb_api_file'] = 'profiles/' . $conf['install_profile'] . '/modules/contrib/fb/facebook-platform/php/facebook.php';
  490. }
  491. }
  492.  
  493. /**
  494. * Domain module
  495. *
  496. */
  497. if (!$custom_da) {
  498. if ($da_inc) {
  499. require_once $da_inc;
  500. }
  501. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement