summaryrefslogtreecommitdiffstats
path: root/usr/local/www/crash_reporter.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2011-02-06 14:24:35 -0500
committerScott Ullrich <sullrich@pfsense.org>2011-02-06 14:24:35 -0500
commit4f09471ce72ea1cad772a5ed98b68df884b7b876 (patch)
treefdff9ddca9f43069810b2e3ddce41ae605a0ca9b /usr/local/www/crash_reporter.php
parent3a6cda80526d676a709c6ca1190d0f57f35a741c (diff)
downloadpfsense-4f09471ce72ea1cad772a5ed98b68df884b7b876.zip
pfsense-4f09471ce72ea1cad772a5ed98b68df884b7b876.tar.gz
Crash reporter is now working.
Diffstat (limited to 'usr/local/www/crash_reporter.php')
-rwxr-xr-xusr/local/www/crash_reporter.php21
1 files changed, 9 insertions, 12 deletions
diff --git a/usr/local/www/crash_reporter.php b/usr/local/www/crash_reporter.php
index 2dd9a50..06f3bdf 100755
--- a/usr/local/www/crash_reporter.php
+++ b/usr/local/www/crash_reporter.php
@@ -43,22 +43,19 @@ require("functions.inc");
require("captiveportal.inc");
function upload_crash_report($files) {
+ $post = array();
+ $counter = 0;
+ foreach($files as $file) {
+ $post["file{$counter}"] = "@{$file}";
+ $counter++;
+ }
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible;)");
- curl_setopt($ch, CURLOPT_URL, "crashreporter.pfsense.org/submit.php");
+ curl_setopt($ch, CURLOPT_URL, "http://crashreporter.pfsense.org/crash_reporter.php");
curl_setopt($ch, CURLOPT_POST, true);
- // same as <input type="file" name="file_box">
- $post = array();
- $counter = 0;
- foreach($files as $file) {
- $tmp = array();
- $tmp["file{$counter}"] = "@{$file}";
- $post[] = $tmp;
- $counter++;
- }
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
return $response;
@@ -87,7 +84,6 @@ include('head.inc');
<?php include("fbegin.inc"); ?>
<form action="crash_reporter.php" method="post">
- <p>
<?php
if (gettext($_POST['Submit']) == "Yes") {
@@ -98,7 +94,8 @@ include('head.inc');
echo gettext("Uploading...");
echo "<p/>";
if(is_array($files_to_upload)) {
- upload_crash_report($files_to_upload);
+ $resp = upload_crash_report($files_to_upload);
+ print_r($resp);
exec("rm /var/crash/*");
echo gettext("Crash files have been submitted for inspection.");
echo "<p/><a href='/'>" . gettext("Continue") . "</a>";
OpenPOWER on IntegriCloud