From 931bf5b8502a39bba32ca7653de93661bbacbc7b Mon Sep 17 00:00:00 2001 From: Herbert Saal Date: Wed, 12 Mar 2014 16:10:00 -0400 Subject: [PATCH] Add configuration options display_errors, error_reporting in env.ini --- .gitignore | 3 +++ gulliver/system/class.bootstrap.php | 8 +++++++- workflow/public_html/bootstrap.php | 11 ++++++----- workflow/public_html/sysGeneric.php | 12 +++++++----- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 0bbfc4bb0..c1ad3565d 100755 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,6 @@ workflow/public_html/lib-dev/ session.data behat.yml workflow/engine/src/Tests/config.ini +shared/ +tests/functional/pm3FunctionalTests.iml +tests/functional/target/ diff --git a/gulliver/system/class.bootstrap.php b/gulliver/system/class.bootstrap.php index a84c70b1b..5d284fcb2 100644 --- a/gulliver/system/class.bootstrap.php +++ b/gulliver/system/class.bootstrap.php @@ -111,7 +111,13 @@ class Bootstrap } // default configuration - $config = array('debug' => 0, 'debug_sql' => 0, 'debug_time' => 0, 'debug_calendar' => 0, 'wsdl_cache' => 1, 'memory_limit' => "256M", 'time_zone' => 'America/New_York', 'memcached' => 0, 'memcached_server' => '', 'default_skin' => 'neoclassic', 'default_lang' => 'en', 'proxy_host' => '', 'proxy_port' => '', 'proxy_user' => '', 'proxy_pass' => '' , 'size_log_file' => 5000000 , 'number_log_file' => 5, 'ie_cookie_lifetime' => 1); + $error_reporting_default = defined('E_DEPRECATED') ? E_ALL & ~E_DEPRECATED : E_ALL; + $error_reporting_default = defined('E_STRICT') ? $error_reporting_default & ~E_STRICT : $error_reporting_default; + + $config = array('debug' => 0, 'debug_sql' => 0, 'debug_time' => 0, 'debug_calendar' => 0, 'wsdl_cache' => 1, 'memory_limit' => "256M", + 'time_zone' => 'America/New_York', 'memcached' => 0, 'memcached_server' => '', 'default_skin' => 'neoclassic', 'default_lang' => 'en', + 'proxy_host' => '', 'proxy_port' => '', 'proxy_user' => '', 'proxy_pass' => '' , 'size_log_file' => 5000000 , 'number_log_file' => 5, + 'ie_cookie_lifetime' => 1, 'error_reporting' => $error_reporting_default, 'display_errors' => 'On'); // read the global env.ini configuration file if ($readGlobalIniFile && ($globalConf = @parse_ini_file($globalIniFile)) !== false) { diff --git a/workflow/public_html/bootstrap.php b/workflow/public_html/bootstrap.php index ec988636c..b1f87d9c6 100755 --- a/workflow/public_html/bootstrap.php +++ b/workflow/public_html/bootstrap.php @@ -64,13 +64,14 @@ $config = System::getSystemConfiguration(); - $e_all = defined('E_DEPRECATED') ? E_ALL & ~E_DEPRECATED : E_ALL; - $e_all = defined('E_STRICT') ? $e_all & ~E_STRICT : $e_all; - $e_all = $config['debug'] ? $e_all : $e_all & ~E_NOTICE; + //$e_all = defined('E_DEPRECATED') ? E_ALL & ~E_DEPRECATED : E_ALL; + //$e_all = defined('E_STRICT') ? $e_all & ~E_STRICT : $e_all; + //$e_all = $config['debug'] ? $e_all : $e_all & ~E_NOTICE; + //$e_all = E_ALL & ~ E_DEPRECATED & ~ E_STRICT & ~ E_NOTICE & ~E_WARNING; // Do not change any of these settings directly, use env.ini instead - ini_set('display_errors', $config['debug']); - ini_set('error_reporting', $e_all); + ini_set( 'display_errors', $config['display_errors']); + ini_set( 'error_reporting', $config['error_reporting']); ini_set('short_open_tag', 'On'); ini_set('default_charset', "UTF-8"); ini_set('memory_limit', $config['memory_limit']); diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index e71503c8a..592aec0bf 100755 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -277,6 +277,7 @@ define( 'PML_DOWNLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/downlo try { Bootstrap::initVendors(); $config = Bootstrap::getSystemConfiguration(); + //var_dump($config); die; // starting session if (isset($config['session.gc_maxlifetime'])) { @@ -293,13 +294,14 @@ try { } //session_start(); - $e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL; - $e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all; - $e_all = $config['debug'] ? $e_all : $e_all & ~ E_NOTICE; + //$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL; + //$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all; + //$e_all = $config['debug'] ? $e_all : $e_all & ~ E_NOTICE; + //$e_all = E_ALL & ~ E_DEPRECATED & ~ E_STRICT & ~ E_NOTICE & ~E_WARNING; // Do not change any of these settings directly, use env.ini instead - ini_set( 'display_errors', $config['debug'] ); - ini_set( 'error_reporting', $e_all ); + ini_set( 'display_errors', $config['display_errors']); + ini_set( 'error_reporting', $config['error_reporting']); ini_set( 'short_open_tag', 'On' ); ini_set( 'default_charset', "UTF-8" ); ini_set( 'memory_limit', $config['memory_limit'] );