diff --git a/application/config/config-defaults.php b/application/config/config-defaults.php index ad8b5de1a06..146238aeeff 100644 --- a/application/config/config-defaults.php +++ b/application/config/config-defaults.php @@ -680,7 +680,13 @@ // Hide update key $config['hide_update_key'] = false; - +// Dev part +// 1 : looking for errors, 2 : PHP STRICT error messages +$config['debug'] = 0; +//1 to enable sql logging, only active when debug = 2 +$config['debugsql'] = 0; +//Try to set if able PHP max_execution_time +$config['max_execution_time'] = 1200; // When this parameter is true, the configuration of the XML file will be used instead of the database to display the themes (default behavior in 2.50+). // This is useful when developing a theme, so changes to XML files are immediately applied without the need to uninstall and reinstall the theme. diff --git a/application/core/LSYii_Controller.php b/application/core/LSYii_Controller.php index 1471eb60a8a..b00b29beb55 100644 --- a/application/core/LSYii_Controller.php +++ b/application/core/LSYii_Controller.php @@ -94,16 +94,16 @@ protected function _init() } if (!function_exists('mb_convert_encoding')) { - $dieoutput .= "This script needs the PHP Multibyte String Functions library installed: See FAQ and PHP documentation
"; + $dieoutput .= "This script needs the PHP Multibyte String Functions library installed: See FAQ and PHP documentation
"; } if ($dieoutput != '') { - throw new CException($dieoutput); + throw new CException($dieoutput); } - if (ini_get("max_execution_time") < 1200) { + if (ini_get("max_execution_time") < Yii::app()->getConfig('max_execution_time')) { try { - set_time_limit(1200); // Maximum execution time - works only if safe_mode is off + set_time_limit(Yii::app()->getConfig('max_execution_time')); // Maximum execution time - works only if safe_mode is off } catch (Exception $e) {}; } if (ini_get('memory_limit') != -1 && convertPHPSizeToBytes(ini_get("memory_limit")) < convertPHPSizeToBytes(Yii::app()->getConfig('memory_limit').'M')) {