dieOnError = true; } if(!empty($_POST["send_report"])) { require_once("Workflow2.php"); require_once("modules/Emails/class.phpmailer.php"); require_once('modules/Emails/mail.php'); $mailtext = "ERROR REPORT WORKFLOW EXTENSION ".Workflow2::VERSION." - vtiger VERSION ".$vtiger_current_version."\n\n"; $mailtext .= "PHPINFO:\n".$_POST["system"]["phpinfo"]."\n\n"; $mailtext .= "TABLES:\n".$_POST["system"]["table"]."\n\n"; $mailtext .= "CurrentUser:\n".$_POST["system"]["currentUser"]."\n\n"; $mailtext .= "FEHLERBESCHREIBUNG:\n".$_POST["errorRecognization"]."\n\n"; $mail = new PHPMailer(); $mail->IsSMTP(); setMailServerProperties($mail); $mail->FromName = "Fehlerbericht"; $mail->Sender = "errorreporting@stefanwarnat.de"; $mail->Subject = "Workflow Designer Error Report"; $mail->Body = $mailtext; $mail->AddAddress("support@stefanwarnat.de", "Stefan Warnat"); $mailReturn = MailSend($mail); #setMailerProperties($mail,$subject,$contents,$from_email,$from_name,trim($to_email,","),$attachment,$emailid,$module,$logo); #$mail_return = send_mail("Accounts", "kontakt@stefanwarnat.de", "Fehlerbereicht", "errorreport@stefanwarnat.de","",$mailtext); /* ONLY DEBUG*/ var_dump($mailReturn); } $extended = !empty($_GET["extend"]); $extendedGroups = array("PHP Variables", "HTTP Headers Information", "Apache Environment"); # Source: http://php.net/manual/de/function.phpinfo.php (Ken) function phpinfo_array() { ob_start(); phpinfo(INFO_ALL); $info_arr = array(); $info_lines = explode("\n", strip_tags(ob_get_clean(), "

")); $cat = "General"; foreach($info_lines as $line) { // new cat? preg_match("~

(.*)

~", $line, $title) ? $cat = trim($title[1]) : null; if(preg_match("~]+>([^<]*)]+>([^<]*)~", $line, $val)) { $info_arr[$cat][$val[1]] = trim($val[2]); } elseif(preg_match("~]+>([^<]*)]+>([^<]*)]+>([^<]*)~", $line, $val)) { $info_arr[$cat][$val[1]] = array("local" => $val[2], "master" => $val[3]); } } return $info_arr; } $debug = array("phpinfo" => array(), "table" => ""); $phpinfo = phpinfo_array(); foreach($phpinfo as $groupKey => $group) { if(in_array($groupKey, $extendedGroups) && $extended == false) { continue; } $debug["phpinfo"][] = "Group: ".$groupKey; if($groupKey == "Apache Environment" && $extended == false) { continue; } foreach($group as $index => $value) { if(!is_string($value) && !empty($value["local"])) { $debug["phpinfo"][] = " `".$index."` = '".$value["local"]."'"; } else { $debug["phpinfo"][] = " `".$index."` = '".$value."'"; } } } $tables = $adb->get_tables(); foreach($tables as $table) { if(substr($table, 0, 9) == "vtiger_wf") { $debug["table"][] = "Table: ".$table; $cols = $adb->query("SHOW FULL COLUMNS FROM `".$table."`"); while($row = $adb->fetchByAssoc($cols)) { $debug["table"][] = " `".$row["field"]."` - ".$row["type"]. " - ".$row["collation"]; } } } ?>

Workflow Designer - Debug






Current User Settings: (Passwords are removed!)



">