summaryrefslogtreecommitdiff
path: root/error.php
diff options
context:
space:
mode:
Diffstat (limited to 'error.php')
-rw-r--r--error.php123
1 files changed, 0 insertions, 123 deletions
diff --git a/error.php b/error.php
deleted file mode 100644
index 7e2a227..0000000
--- a/error.php
+++ /dev/null
@@ -1,123 +0,0 @@
-<?php function ch_error($level, $message, $file = null, $line = null, $context = null) {
- if ($level === E_USER_DEPRECATED || $level === E_DEPRECATED) return false;
-
- ob_end_clean();
-
- ?>
-
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <title>500 Internal server error ยท Ponycule</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
- <link rel="shortcut icon" href="/assets/logo/newlogo-ng.png" type="image/png">
- <style>
- html, body {
- background: black;
- color: white;
- }
-
- .list-group-item {
- color: #fff;
- background-color: #222;
- border: 1px solid rgba(255, 255, 255, .125);
- }
-
- .list-group-item.disabled {
- color: #fff;
- background-color: #222;
- border-color: rgba(255, 255, 255, .125);
- opacity: .75;
- }
-
- .list-group-item:hover {
- background-color: #252525;
- color: #ddd;
- }
-
- .list-group-item:active, .list-group-item:focus {
- background-color: #272727;
- color: #bbb;
- }
- </style>
-</head>
-<body>
- <div class="container" style="margin-top: 50px;">
- <h1>500 Internal server error</h1>
- <p>We apologize, but an error occurred while rendering this page. As a consequence, we are currently unable to process your request. Please try this again later. You may also want to <a href="https://bugs.equestria.dev/newIssue?project=CH" target="_blank" style="filter: invert(1) hue-rotate(180deg);">report this to us</a>, so we can quickly fix it.</p>
- <div class="list-group">
- <a href="/" class="list-group-action list-group-item">Go to the home page</a>
- <a href="/-/jobs" class="list-group-action list-group-item">Access the jobs list (for administrators)</a>
- </div>
- <hr>
- <pre>
- Ponycule/CH crash report
- ======================
-
- Code <?= $level ?> [<?php
-
- if ($level === E_ERROR) echo("E_ERROR");
- if ($level === E_WARNING) echo("E_WARNING");
- if ($level === E_NOTICE) echo("E_NOTICE");
- if ($level === E_USER_ERROR) echo("E_USER_ERROR");
- if ($level === E_USER_WARNING) echo("E_USER_WARNING");
- if ($level === E_USER_NOTICE) echo("E_USER_NOTICE");
- if ($level === E_STRICT) echo("E_STRICT");
- if ($level === E_ALL) echo("E_ALL");
- if ($level === E_COMPILE_ERROR) echo("E_ALL");
- if ($level === E_COMPILE_WARNING) echo("E_ALL");
- if ($level === E_CORE_ERROR) echo("E_ALL");
- if ($level === E_CORE_WARNING) echo("E_ALL");
- if ($level === E_PARSE) echo("E_PARSE");
- if ($level === E_RECOVERABLE_ERROR) echo("E_RECOVERABLE_ERROR");
-
- ?>]
- <?= $message ?>
-
-
-=> In <?= $file ?> (line <?= $line ?>) <=
-
- 00 <?= strtoupper(substr(md5($level), 0, 8)) ?>
-
- 01 <?= strtoupper(substr(md5($message), 0, 8)) ?>
-
- 02 <?= strtoupper(substr(md5($file), 0, 8)) ?>
-
- 03 <?= strtoupper(substr(md5($line), 0, 8)) ?>
-
-
-<?php $sp = 0; foreach (array_reverse(debug_backtrace()) as $item): ?>
- <?= ($item["file"] ?? "[unknown file]") === $file ? "*" : " " ?> <?= str_repeat(" ", $sp) ?><?= $item["file"] ?? "[unknown file]" ?>:<?= $item["line"] ?? "?" ?> => <?= $item["function"] ?? "???" ?>
-
-<?php $sp += 4; endforeach; ?>
-
-
-<?php foreach (get_included_files() as $f): ?>
- <?= $f === $file ? "*" : " " ?> <?= $f ?>
-
-<?php endforeach; ?>
-
-<?php foreach ($_SERVER as $item => $value): ?>
- <?= $item ?>: <?= ($item === "HTTP_COOKIE") ? "[redacted for privacy]" : $value ?>
-
-<?php endforeach; ?>
-
- memory_get_usage(): <?php var_dump(memory_get_usage()); ?>
- memory_get_peak_usage(): <?php var_dump(memory_get_peak_usage()); ?>
- phpversion(): <?php var_dump(phpversion()); ?>
- php_uname(): <?php var_dump(php_uname()); ?>
- zend_version(): <?php var_dump(zend_version()); ?>
- getmypid(): <?php var_dump(getmypid()); ?>
- getmyuid(): <?php var_dump(getmyuid()); ?>
- getmygid(): <?php var_dump(getmygid()); ?>
- getmyinode(): <?php var_dump(getmyinode()); ?>
- </pre>
- </div>
-</body>
-</html>
-
-<?php die(); } ?> \ No newline at end of file