X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fphp_setup.inc;h=ec13459435faafcdfcb6492c3f538883d69db13b;hb=a2227f5221dbb0f33f4bd21d785569f5abb1225b;hp=6fafb2dcd9ca9cbacc0a3d395678d3e47760d1bd;hpb=4c11c97f3cdb417ab907bec8556fc439fd7c2288;p=gosa.git
diff --git a/include/php_setup.inc b/include/php_setup.inc
index 6fafb2dcd..ec1345943 100644
--- a/include/php_setup.inc
+++ b/include/php_setup.inc
@@ -22,6 +22,10 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
{
global $error_collector,$config;
+ if(@class_exists("log")){
+ new log("debug","all",$errfile,array(),"Type:".$errno.", Message:".$errstr.", File:".$errfile.", Line: ".$errline);
+ }
+
/* Return if error reporting is set to zero */
if (error_reporting() == 0){
return;
@@ -57,7 +61,7 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
if((isset($config->data['MAIN']['DISPLAYERRORS']))&&(!preg_match("/^true$/i",$config->data['MAIN']['DISPLAYERRORS']))){
/* Write to syslog */
- gosa_log ("PHP error: $errstr ($errfile, line $errline)");
+ new log("view","error","",array(),"PHP error: $errstr ($errfile, line $errline)");
return;
}
}
@@ -68,7 +72,7 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
if (isset($_SESSION['js']) && $_SESSION['js']==FALSE){
$error_collector= "
";
} else {
- $error_collector= "
"._("Generating this page caused the PHP interpreter to raise some errors!")."
";
+ $error_collector= "
"._("Generating this page caused the PHP interpreter to raise some errors!")."
";
}
}
@@ -108,6 +112,12 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
$args= "";
if (isset($ct['args'])){
foreach ($ct['args'] as $arg){
+
+ /* Avoid convertig object to string errors */
+ if(is_object($arg)){
+ $arg = "CLASS: ".get_class($arg);
+ }
+
$args.= htmlentities("\"$arg\", ");
}
}
@@ -165,12 +175,6 @@ ini_set("display_errors",1);
ini_set("report_memleaks",1);
ini_set("include_path",".:$BASE_DIR/include");
-/* This specifies, how old a session file must be, before it is deleted
- Don't change this value, use gosa.conf session_lifetime instead
- ^ Value in seconds = 1 day, php.ini default is 1440 ~ 24 min
-*/
-ini_set("session.gc_maxlifetime",8640);
-
/* Do smarty setup */
require("smarty/Smarty.class.php");
$smarty = new Smarty;