PNG  IHDR* pHYs+ IDATx]n#; cdLb Ǚ[at¤_:uP}>!Usă cag޿ ֵNu`ݼTâabO7uL&y^wFٝA"l[|ŲHLN밪4*sG3|Dv}?+y߉{OuOAt4Jj.u]Gz*҉sP'VQKbA1u\`& Af;HWj hsO;ogTu uj7S3/QzUr&wS`M$X_L7r2;aE+ώ%vikDA:dR+%KzƉo>eOth$z%: :{WwaQ:wz%4foɹE[9<]#ERINƻv溂E%P1i01 |Jvҗ&{b?9g=^wζXn/lK::90KwrюO\!ջ3uzuGv^;騢wq<Iatv09:tt~hEG`v;3@MNZD.1]L:{ծI3`L(÷ba")Y.iljCɄae#I"1 `3*Bdz>j<fU40⨬%O$3cGt]j%Fߠ_twJ;ABU8vP3uEԑwQ V:h%))LfraqX-ۿX]v-\9I gl8tzX ]ecm)-cgʒ#Uw=Wlێn(0hPP/ӨtQ“&J35 $=]r1{tLuǮ*i0_;NƝ8;-vݏr8+U-kruȕYr0RnC]*ެ(M:]gE;{]tg(#ZJ9y>utRDRMdr9㪩̞zֹb<ģ&wzJM"iI( .ꮅX)Qw:9,i좜\Ԛi7&N0:asϓc];=ΗOӣ APqz93 y $)A*kVHZwBƺnWNaby>XMN*45~ղM6Nvm;A=jֲ.~1}(9`KJ/V F9[=`~[;sRuk]rєT!)iQO)Y$V ی ۤmzWz5IM Zb )ˆC`6 rRa}qNmUfDsWuˤV{ Pݝ'=Kֳbg,UҘVz2ﴻnjNgBb{? ߮tcsͻQuxVCIY۠:(V뺕 ٥2;t`@Fo{Z9`;]wMzU~%UA蛚dI vGq\r82iu +St`cR.6U/M9IENDB` REDROOM
PHP 5.6.40
Preview: error_monitor.php Size: 8.81 KB
/home/ankaservis/.trash/error_monitor.php

<?php
/**
 * Error Log Monitor - Gerçek Zamanlı Hata Takibi
 * PHP 7.4 Geçiş sürecinde hata takibi için
 */

// Sadece localhost'tan erişime izin ver
if ($_SERVER['REMOTE_ADDR'] !== '127.0.0.1' && $_SERVER['REMOTE_ADDR'] !== '::1') {
    die('Access denied');
}

$log_file = __DIR__ . '/php_errors.log';
$action = $_GET['action'] ?? 'view';

?>
<!DOCTYPE html>
<html lang="tr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Error Log Monitor - PHP 7.4 Geçiş</title>
    <style>
        body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 20px; background: #f5f5f5; }
        .container { max-width: 1200px; margin: 0 auto; background: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
        .header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 20px; border-radius: 8px 8px 0 0; }
        .header h1 { margin: 0; font-size: 24px; }
        .stats { display: flex; gap: 20px; margin-top: 15px; }
        .stat-box { background: rgba(255,255,255,0.2); padding: 10px 15px; border-radius: 5px; text-align: center; }
        .stat-number { font-size: 24px; font-weight: bold; }
        .stat-label { font-size: 12px; opacity: 0.9; }
        .controls { padding: 20px; border-bottom: 1px solid #eee; }
        .btn { background: #4CAF50; color: white; padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; margin-right: 10px; text-decoration: none; display: inline-block; }
        .btn-danger { background: #f44336; }
        .btn-warning { background: #ff9800; }
        .btn-info { background: #2196F3; }
        .log-container { padding: 20px; max-height: 600px; overflow-y: auto; }
        .log-entry { margin-bottom: 10px; padding: 10px; border-radius: 4px; font-family: 'Courier New', monospace; font-size: 12px; }
        .error { background: #ffebee; border-left: 4px solid #f44336; }
        .warning { background: #fff3e0; border-left: 4px solid #ff9800; }
        .notice { background: #e3f2fd; border-left: 4px solid #2196F3; }
        .deprecated { background: #f3e5f5; border-left: 4px solid #9c27b0; }
        .timestamp { color: #666; font-weight: bold; }
        .error-type { color: #d32f2f; font-weight: bold; }
        .file-info { color: #1976d2; }
        .no-errors { text-align: center; color: #4CAF50; font-size: 18px; padding: 40px; }
        .auto-refresh { position: fixed; top: 20px; right: 20px; background: #333; color: white; padding: 10px; border-radius: 4px; }
    </style>
</head>
<body>

<div class="container">
    <div class="header">
        <h1>🔍 Error Log Monitor</h1>
        <div class="stats">
            <?php
            $total_errors = 0;
            $error_types = [];
            
            if (file_exists($log_file)) {
                $lines = file($log_file, FILE_IGNORE_NEW_LINES);
                $total_errors = count($lines);
                
                foreach ($lines as $line) {
                    if (preg_match('/\[(ERROR|WARNING|NOTICE|DEPRECATED)\]/', $line, $matches)) {
                        $type = $matches[1];
                        $error_types[$type] = ($error_types[$type] ?? 0) + 1;
                    }
                }
            }
            ?>
            <div class="stat-box">
                <div class="stat-number"><?= $total_errors ?></div>
                <div class="stat-label">Toplam Hata</div>
            </div>
            <div class="stat-box">
                <div class="stat-number"><?= $error_types['ERROR'] ?? 0 ?></div>
                <div class="stat-label">Error</div>
            </div>
            <div class="stat-box">
                <div class="stat-number"><?= $error_types['WARNING'] ?? 0 ?></div>
                <div class="stat-label">Warning</div>
            </div>
            <div class="stat-box">
                <div class="stat-number"><?= $error_types['DEPRECATED'] ?? 0 ?></div>
                <div class="stat-label">Deprecated</div>
            </div>
        </div>
    </div>
    
    <div class="controls">
        <a href="?action=view" class="btn btn-info">📋 Hataları Görüntüle</a>
        <a href="?action=clear" class="btn btn-danger" onclick="return confirm('Tüm hataları temizlemek istediğinizden emin misiniz?')">🗑️ Temizle</a>
        <a href="?action=download" class="btn btn-warning">💾 İndir</a>
        <button onclick="location.reload()" class="btn">🔄 Yenile</button>
        <button onclick="toggleAutoRefresh()" class="btn" id="autoRefreshBtn">⏱️ Otomatik Yenileme</button>
    </div>
    
    <div class="log-container">
        <?php
        if ($action === 'clear') {
            if (file_exists($log_file)) {
                file_put_contents($log_file, '');
                echo '<div class="no-errors">✅ Log dosyası temizlendi!</div>';
            }
        } elseif ($action === 'download') {
            if (file_exists($log_file)) {
                header('Content-Type: text/plain');
                header('Content-Disposition: attachment; filename="php_errors_' . date('Y-m-d_H-i-s') . '.log"');
                readfile($log_file);
                exit;
            }
        } else {
            // Hataları görüntüle
            if (!file_exists($log_file) || filesize($log_file) == 0) {
                echo '<div class="no-errors">🎉 Henüz hata yok! Sistem temiz çalışıyor.</div>';
            } else {
                $lines = file($log_file, FILE_IGNORE_NEW_LINES);
                $lines = array_reverse($lines); // En son hatalar üstte
                
                foreach ($lines as $line) {
                    if (empty(trim($line))) continue;
                    
                    // Log satırını parse et
                    if (preg_match('/\[(.*?)\] \[(.*?)\] (.*?) in (.*?) on line (\d+)/', $line, $matches)) {
                        $timestamp = $matches[1];
                        $type = $matches[2];
                        $message = $matches[3];
                        $file = $matches[4];
                        $line_num = $matches[5];
                        
                        $css_class = strtolower($type);
                        if ($type === 'ERROR' || $type === 'CORE_ERROR') $css_class = 'error';
                        elseif ($type === 'WARNING' || $type === 'USER_WARNING') $css_class = 'warning';
                        elseif ($type === 'NOTICE' || $type === 'USER_NOTICE') $css_class = 'notice';
                        elseif ($type === 'DEPRECATED') $css_class = 'deprecated';
                        
                        echo "<div class='log-entry $css_class'>";
                        echo "<span class='timestamp'>$timestamp</span> ";
                        echo "<span class='error-type'>[$type]</span> ";
                        echo "<span class='message'>$message</span><br>";
                        echo "<span class='file-info'>📁 " . basename($file) . " (satır: $line_num)</span>";
                        echo "</div>";
                    } else {
                        // Parse edilemeyen satırlar
                        echo "<div class='log-entry notice'>$line</div>";
                    }
                }
            }
        }
        ?>
    </div>
</div>

<div class="auto-refresh" id="autoRefreshStatus" style="display: none;">
    Otomatik yenileme aktif - <span id="countdown">30</span>s
</div>

<script>
let autoRefresh = false;
let countdown = 30;
let countdownInterval;

function toggleAutoRefresh() {
    autoRefresh = !autoRefresh;
    const btn = document.getElementById('autoRefreshBtn');
    const status = document.getElementById('autoRefreshStatus');
    
    if (autoRefresh) {
        btn.innerHTML = '⏹️ Otomatik Yenilemeyi Durdur';
        status.style.display = 'block';
        startCountdown();
    } else {
        btn.innerHTML = '⏱️ Otomatik Yenileme';
        status.style.display = 'none';
        clearInterval(countdownInterval);
    }
}

function startCountdown() {
    countdown = 30;
    countdownInterval = setInterval(() => {
        countdown--;
        document.getElementById('countdown').textContent = countdown;
        
        if (countdown <= 0) {
            location.reload();
        }
    }, 1000);
}

// Sayfa yüklendiğinde son hataları vurgula
document.addEventListener('DOMContentLoaded', function() {
    const entries = document.querySelectorAll('.log-entry');
    if (entries.length > 0) {
        entries[0].style.animation = 'pulse 2s ease-in-out';
    }
});
</script>

<style>
@keyframes pulse {
    0% { background-color: #fff3cd; }
    50% { background-color: #ffeaa7; }
    100% { background-color: inherit; }
}
</style>

</body>
</html>

Directory Contents

Dirs: 0 × Files: 15

Name Size Perms Modified Actions
1.04 KB lrw------- 2025-11-14 06:31:49
Edit Download
33.24 KB lrw-r--r-- 2025-08-29 14:12:44
Edit Download
33.24 KB lrw-r--r-- 2025-08-29 14:12:44
Edit Download
33.46 MB lrw-r--r-- 2025-11-13 15:09:42
Edit Download
16.25 MB lrw-r--r-- 2025-11-13 12:29:23
Edit Download
16.25 MB lrw-r--r-- 2025-11-13 12:30:16
Edit Download
8.81 KB lrw-r--r-- 2025-08-29 14:25:54
Edit Download
2.53 KB lrw-r--r-- 2025-08-30 02:18:32
Edit Download
1.05 KB lrw-r--r-- 2025-08-29 13:29:28
Edit Download
2.21 KB lrw-r--r-- 2025-08-29 13:33:36
Edit Download
3.61 KB lrw-r--r-- 2025-08-29 13:31:38
Edit Download
703 B lrw-r--r-- 2025-08-30 03:31:04
Edit Download
3.23 KB lrw-r--r-- 2025-08-29 13:29:04
Edit Download
1.46 KB lrw-r--r-- 2025-08-29 13:01:24
Edit Download
2.82 KB lrw-r--r-- 2025-08-29 13:35:36
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 REDROOM — Secure File Manager. All rights reserved. Built with ❤️ & Red Dark UI