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:
Erik Amaru Ortiz
2012-04-12 18:47:00 -04:00
parent 489861baa3
commit 412967ce18
4 changed files with 27 additions and 10 deletions

View File

@@ -7,6 +7,5 @@
define("WORKFLOW_PATH", $scriptDir . 'workflow/'); define("WORKFLOW_PATH", $scriptDir . 'workflow/');
define("WORKFLOW_BIN_PATH", $scriptDir . 'workflow/engine/bin/'); define("WORKFLOW_BIN_PATH", $scriptDir . 'workflow/engine/bin/');
include ( WORKFLOW_BIN_PATH . '/cli.php'); include WORKFLOW_BIN_PATH . '/cli.php';
?>

View File

@@ -47,9 +47,28 @@
G::LoadClass("cli"); G::LoadClass("cli");
/* Hide notice, otherwise we get a lot of messages */ require_once PATH_HOME . 'engine' . PATH_SEP . 'classes' . PATH_SEP . 'class.system.php';
error_reporting(E_ALL ^ E_NOTICE); $config = System::getSystemConfiguration(PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'env.ini');
ini_set('display_errors', 1);
$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 // trap -V before pake
if (in_array('-v', $argv) || in_array('-V', $argv) || in_array('--version', $argv)) if (in_array('-v', $argv) || in_array('-V', $argv) || in_array('--version', $argv))
@@ -78,5 +97,3 @@
CLI::run(); CLI::run();
exit(0); exit(0);
?>

View File

@@ -1030,13 +1030,13 @@ class System {
/* Read the env.ini */ /* Read the env.ini */
$ini_contents = parse_ini_file($iniFile, false); $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) { if ($ini_contents !== false) {
$config = array_merge($config, $ini_contents); $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; return $config;
} }

View File

@@ -66,6 +66,7 @@
ini_set('default_charset', "UTF-8"); ini_set('default_charset', "UTF-8");
ini_set('memory_limit', $config['memory_limit']); ini_set('memory_limit', $config['memory_limit']);
ini_set('soap.wsdl_cache_enabled', $config['wsdl_cache']); 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_SQL_LOG', $config['debug_sql']);
define ('DEBUG_TIME_LOG', $config['debug_time']); define ('DEBUG_TIME_LOG', $config['debug_time']);