BUG 8978 "Upgrade de la version 2.0.39 a la version 2.0.40 no ..." SOLVED
- for some php versions date.timezone is not configurated by default, that why th problem - on cli.php date.timezone is being configurated now, if env.ini exists, its configuration in read
This commit is contained in:
@@ -7,6 +7,5 @@
|
||||
define("WORKFLOW_PATH", $scriptDir . 'workflow/');
|
||||
define("WORKFLOW_BIN_PATH", $scriptDir . 'workflow/engine/bin/');
|
||||
|
||||
include ( WORKFLOW_BIN_PATH . '/cli.php');
|
||||
include WORKFLOW_BIN_PATH . '/cli.php';
|
||||
|
||||
?>
|
||||
|
||||
@@ -47,9 +47,28 @@
|
||||
|
||||
G::LoadClass("cli");
|
||||
|
||||
/* Hide notice, otherwise we get a lot of messages */
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
ini_set('display_errors', 1);
|
||||
require_once PATH_HOME . 'engine' . PATH_SEP . 'classes' . PATH_SEP . 'class.system.php';
|
||||
$config = System::getSystemConfiguration(PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'env.ini');
|
||||
|
||||
$e_all = defined('E_DEPRECATED') ? E_ALL & ~E_DEPRECATED : E_ALL;
|
||||
$e_all = defined('E_STRICT') ? E_ALL & ~E_STRICT : $e_all;
|
||||
$e_all = $e_all & ~E_NOTICE; // don't notices
|
||||
|
||||
// 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('short_open_tag', 'On');
|
||||
ini_set('default_charset', "UTF-8");
|
||||
ini_set('memory_limit', $config['memory_limit']);
|
||||
ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
|
||||
ini_set('date.timezone', $config['time_zone']);
|
||||
|
||||
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']);
|
||||
|
||||
// trap -V before pake
|
||||
if (in_array('-v', $argv) || in_array('-V', $argv) || in_array('--version', $argv))
|
||||
@@ -78,5 +97,3 @@
|
||||
CLI::run();
|
||||
|
||||
exit(0);
|
||||
|
||||
?>
|
||||
|
||||
@@ -1030,13 +1030,13 @@ class System {
|
||||
|
||||
/* Read the env.ini */
|
||||
$ini_contents = parse_ini_file($iniFile, false);
|
||||
|
||||
// validation debug config, ony accept bynary values, 1 to enable
|
||||
$ini_contents['debug'] = $ini_contents['debug'] == 1 ? 1 : 0;
|
||||
|
||||
if ($ini_contents !== false) {
|
||||
$config = array_merge($config, $ini_contents);
|
||||
}
|
||||
|
||||
// validation debug config, ony accept bynary values, 1 to enable
|
||||
$config['debug'] = $config['debug'] == 1 ? 1 : 0;
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
ini_set('default_charset', "UTF-8");
|
||||
ini_set('memory_limit', $config['memory_limit']);
|
||||
ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']);
|
||||
ini_set('date.timezone', $config['time_zone']);
|
||||
|
||||
define ('DEBUG_SQL_LOG', $config['debug_sql']);
|
||||
define ('DEBUG_TIME_LOG', $config['debug_time']);
|
||||
|
||||
Reference in New Issue
Block a user