| Server IP : 172.67.201.108 / Your IP : 216.73.217.143 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/banners/domains/stagemag/ |
Upload File : |
<?php
require_once __DIR__.'/functions.php';
init_session();
// Collect error info from the environment or passed variables
$errorMessage = $errorMessage ?? ($_GET['message'] ?? 'An unexpected error occurred.');
$errorDetail = $errorDetail ?? ($_GET['detail'] ?? '');
$errorType = $errorType ?? ($_GET['type'] ?? 'Application');
$errorCode = $errorCode ?? ($_GET['code'] ?? '');
$errorTemplate = $errorTemplate ?? ($_GET['template'] ?? '');
$errorLine = $errorLine ?? ($_GET['line'] ?? '');
// Log error to database
try {
$stmt = db_write()->prepare(
"INSERT INTO bway_bww.errorlog
(server, ip, browser, pagename, errormessage, errordetail, errorcode, errorextendedinfo, errortype, errortemplate, errorline, errorcodeprinthtml, localip)
VALUES (:server, :ip, :browser, :pagename, :errormessage, :errordetail, :errorcode, :errorextendedinfo, :errortype, :errortemplate, :errorline, :errorcodeprinthtml, :localip)"
);
$stmt->execute([
':server' => 'Cloud',
':ip' => $_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR'] ?? '',
':browser' => $_SERVER['HTTP_USER_AGENT'] ?? '',
':pagename' => $_SERVER['SCRIPT_NAME'] ?? '',
':errormessage' => $errorMessage,
':errordetail' => $errorDetail,
':errorcode' => $errorCode,
':errorextendedinfo' => '',
':errortype' => $errorType,
':errortemplate' => $errorTemplate,
':errorline' => $errorLine,
':errorcodeprinthtml'=> '',
':localip' => $_SERVER['SERVER_ADDR'] ?? '',
]);
} catch (Exception $e) {
error_log('Failed to log error to DB: ' . $e->getMessage() . ' - Original error: ' . $errorMessage);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Error - BroadwayWorld Stage Mag</title>
<style>
#error-table { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 11px; background-color: #930; border-collapse: collapse; }
#error-table td { font-size: 1.1em; border: 1px solid #930; color: #930; background-color: #FC0; line-height: 1.35; }
#error-table td.label { background-color: #F90; font-weight: bold; white-space: nowrap; vertical-align: top; padding: 6px 10px; }
#error-table td.value { padding: 6px 10px; }
</style>
</head>
<body>
<table id="error-table" cellpadding="4" cellspacing="1">
<tr>
<td colspan="2" class="label">Error (<?= htmlspecialchars($errorType) ?>)</td>
</tr>
<tr>
<td class="label">Message</td>
<td class="value"><?= nl2br(htmlspecialchars($errorMessage)) ?></td>
</tr>
<?php if ($errorDetail !== ''): ?>
<tr>
<td class="label">Detail</td>
<td class="value"><?= nl2br(htmlspecialchars($errorDetail)) ?></td>
</tr>
<?php endif; ?>
<?php if ($errorCode !== '' && $errorCode !== '0'): ?>
<tr>
<td class="label">Error Code</td>
<td class="value"><?= htmlspecialchars($errorCode) ?></td>
</tr>
<?php endif; ?>
<?php if ($errorTemplate !== ''): ?>
<tr>
<td class="label">Template</td>
<td class="value"><?= htmlspecialchars($errorTemplate) ?><?php if ($errorLine !== ''): ?>: line <?= htmlspecialchars($errorLine) ?><?php endif; ?></td>
</tr>
<?php endif; ?>
<tr>
<td class="label">Timestamp</td>
<td class="value"><?= date('m/d/Y g:i:s A') ?></td>
</tr>
</table>
</body>
</html>