From 0885d9d260e194a124b6dc394aeba2174de05f4b Mon Sep 17 00:00:00 2001 From: Fernando Ontiveros Date: Wed, 18 Jan 2012 09:04:40 -0400 Subject: [PATCH] second commit to enable pmMonitor plugin --- workflow/engine/config/paths.php | 13 +++++----- workflow/public_html/sysGeneric.php | 39 ----------------------------- 2 files changed, 7 insertions(+), 45 deletions(-) diff --git a/workflow/engine/config/paths.php b/workflow/engine/config/paths.php index e23a6246d..81e3bbde3 100755 --- a/workflow/engine/config/paths.php +++ b/workflow/engine/config/paths.php @@ -31,9 +31,11 @@ 'debug_calendar' => 0, 'wsdl_cache' => 1, 'memory_limit' => '100M', - 'time_zone' => 'America/La_Paz' + 'time_zone' => 'America/La_Paz', + 'memcached_server' => 0, + 'memcached_server' => '' ); - + /* Read the env.ini */ $env_file = realpath(dirname(__FILE__) . "/env.ini"); $config = $default_config; @@ -48,10 +50,7 @@ $config['debug'] = 1; } } - - if ($config['debug']) { - $config['debug_sql'] = 1; - } + //*** Do not change any of these settings directly, use env.ini instead ini_set('display_errors','On'); @@ -68,6 +67,8 @@ define ('DEBUG_SQL_LOG', $config['debug_sql'] ); define ('DEBUG_TIME_LOG', $config['debug_time'] ); define ('DEBUG_CALENDAR_LOG', $config['debug_calendar'] ); + define ('MEMCACHED_ENABLED', $config['memcached']); + define ('MEMCACHED_SERVER', $config['memcached_server']); define ('TIME_ZONE', $config['time_zone']); diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index f88a35491..795ae6749 100755 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -2,45 +2,6 @@ //sysGeneric, this file is used initialize main variables and redirect to each and all pages $startingTime = microtime(true); - /* Default configuration values (do not change these, use env.ini) */ - $default_config = array( - 'debug' => 0, - 'debug_sql' => 0, - 'debug_time' => 0, - 'debug_calendar' => 0, - 'wsdl_cache' => 1, - 'memory_limit' => '100M', - 'time_zone' => 'America/La_Paz' - ); - - /* Read the env.ini */ - $env_file = realpath(dirname(__FILE__) . "/../engine/config/env.ini"); - if ($env_file !== false && file_exists($env_file)) { - $config = array_merge($default_config, parse_ini_file($env_file, false)); - } else { - $config = $default_config; - } - - if ($config['debug']) { - $config['debug_sql'] = 1; - } - -//*** Do not change any of these settings directly, use env.ini instead - ini_set('display_errors','On'); - ini_set('short_open_tag', 'on'); - ini_set('asp_tags', 'on'); - ini_set('register_globals', 'off'); - ini_set('default_charset', "UTF-8"); - - $e_all = defined('E_DEPRECATED') ? E_ALL ^ E_DEPRECATED : E_ALL; - ini_set('error_reporting', ($config['debug'] ? $e_all : $e_all ^ E_NOTICE) ); - ini_set('memory_limit', $config['memory_limit']); - ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']); - - define ('DEBUG_SQL_LOG', $config['debug_sql'] ); - define ('DEBUG_TIME_LOG', $config['debug_time'] ); - define ('DEBUG_CALENDAR_LOG', $config['debug_calendar'] ); - //*** process the $_POST with magic_quotes enabled function strip_slashes(&$vVar) { if (is_array($vVar)) {