" . gettext("Unfortunately we have detected a programming bug.") . "

"; echo "

" . gettext("Would you like to submit the programming debug logs to the pfSense developers for inspection?") . "

"; echo "

" . gettext("Please double check the contents to ensure you are comfortable sending this information before clicking Yes.") . "

"; echo "

" . gettext("Contents of crash reports") . ":
"; echo "

"; echo "

" . gettext(" - Submit this to the developers for inspection") . "

"; echo "

" . gettext(" - Just delete the crash report and take me back to the Dashboard") . "

"; echo ""; } $pgtitle = array(gettext("Diagnostics"), gettext("Crash reporter")); include('head.inc'); $crash_report_header = "Crash report begins. Anonymous machine information:\n\n"; $crash_report_header .= php_uname("m") . "\n"; $crash_report_header .= php_uname("r") . "\n"; $crash_report_header .= php_uname("v") . "\n"; $crash_report_header .= "\nCrash report details:\n"; exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors); ?>
"; echo gettext("Uploading..."); ob_flush(); flush(); if (is_array($files_to_upload)) { $resp = upload_crash_report($files_to_upload); array_map('unlink', glob("/var/crash/*")); // Erase the contents of the PHP error log fclose(fopen("/tmp/PHP_errors.log", 'w')); echo "
"; print_r($resp); echo "

" . gettext("Continue") . "" . gettext(" and delete crash report files from local disk.") . "

"; } else { echo "Could not find any crash files."; } } else if (gettext($_POST['Submit']) == "No") { array_map('unlink', glob("/var/crash/*")); // Erase the contents of the PHP error log fclose(fopen("/tmp/PHP_errors.log", 'w')); header("Location: /"); exit; } else { $crash_files = glob("/var/crash/*"); $crash_reports = $crash_report_header; if (count($php_errors) > 0) { $crash_reports .= "\nPHP Errors:\n"; $crash_reports .= implode("\n", $php_errors) . "\n\n"; } if (is_array($crash_files)) { foreach ($crash_files as $cf) { if (filesize($cf) < FILE_SIZE) { $crash_reports .= "\nFilename: {$cf}\n"; $crash_reports .= file_get_contents($cf); } } } else { echo "Could not locate any crash data."; } output_crash_reporter_html($crash_reports); } ?>