Skip to content

0xAhmadYousuf/PHP-Error-Log-Viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PHP Error Log Viewer 🐘

GitHub GitHub stars GitHub forks

A professional, feature-rich PHP Error Log Viewer with advanced tracking, progress monitoring, and beautiful dark/light themes. Perfect for developers who want to efficiently monitor, track, and resolve PHP errors with a modern, intuitive interface.

Screenshot_001

✨ Features

🎯 Core Functionality

  • Real-time Error Parsing: Automatically parses and categorizes PHP error logs
  • Multi-file Error Support: Handles errors from multiple PHP files and libraries
  • Smart Error Grouping: Groups similar errors for better organization
  • Stack Trace Analysis: Detailed stack trace viewing for complex errors
  • Error Log Clearing: One-click error log cleanup with confirmation

πŸ“Š Advanced Tracking & Progress

  • Error Resolution Tracking: Mark errors as solved with developer attribution
  • Reoccurrence Detection: Automatically detects when solved errors occur again
  • Visual Progress Bars: Segmented progress bars with diagonal stripes for solved errors
  • Master Progress Overview: Comprehensive dashboard showing overall error resolution status
  • Developer Identity Management: Track who solved which errors with persistent cookie storage

🎨 Modern UI/UX

  • Dark/Light Theme Toggle: VS Code-style themes with smooth transitions
  • Responsive Design: Works perfectly on desktop, tablet, and mobile devices
  • Color-coded Error Types: Instant visual identification of error severity
    • πŸ”΄ Fatal/Error: Red tags with shadows
    • 🟑 Warning: Yellow tags with shadows
    • πŸ”΅ Notice: Blue tags with shadows
    • 🟠 Deprecated: Orange tags with shadows
    • 🟣 Parse: Purple tags with shadows
  • Collapsible Sections: Organized sections with persistent state
  • Modal Error Details: Full error content in beautiful modal windows

πŸ”§ Developer Tools

  • One-click File Path Copying: Quick access to error file locations
  • Error Hash Generation: Unique identification for each error type
  • JSON Export/Import: Solved errors data persistence
  • Recent Errors Filter: 24-hour error view for immediate issues
  • Critical Error Highlighting: Special treatment for vendor/library errors

πŸ“ˆ Analytics & Insights

  • Error Statistics: Real-time counts of different error types
  • Progress Tracking: Visual indicators for team productivity
  • Time-based Filtering: Focus on recent errors that need attention
  • Reoccurrence Alerts: Immediate notification when solved errors return

πŸš€ Quick Installation

Method 1: One-Click Installer (Recommended)

Create a file called install.php in your web root and run it:

<?php
// PHP Error Log Viewer Installer
$repo = 'https://github.com/0xAhmadYousuf/PHP-Error-Log-Viewer/archive/refs/heads/main.zip';
$zip = 'error-viewer.zip';
$target = './error-viewer/';

echo "πŸ“₯ Downloading PHP Error Log Viewer...\n";
file_put_contents($zip, file_get_contents($repo));

$za = new ZipArchive();
if ($za->open($zip) === TRUE) {
    $za->extractTo('./');
    $za->close();
    rename('./PHP-Error-Log-Viewer-main/src', $target);
    unlink($zip);
    rmdir('./PHP-Error-Log-Viewer-main');
    echo "βœ… Installation complete! Visit: " . $_SERVER['HTTP_HOST'] . "/error-viewer/\n";
} else {
    echo "❌ Installation failed. Please download manually.\n";
}
?>

Method 2: Manual Installation

  1. Download the repository:

    git clone https://github.com/0xAhmadYousuf/PHP-Error-Log-Viewer.git
  2. Copy files to your web directory:

    cp -r PHP-Error-Log-Viewer/src/* /path/to/your/webroot/error-viewer/
  3. Set permissions:

    chmod 755 /path/to/your/webroot/error-viewer/
    chmod 666 /path/to/your/webroot/error-viewer/solved_errors.json
  4. Access the viewer: Navigate to http://yourdomain.com/error-viewer/

πŸ“ File Structure

src/
β”œβ”€β”€ index.php              # Main application file
β”œβ”€β”€ template.html          # UI template with themes and styling
β”œβ”€β”€ update_error_status.php # API endpoint for marking errors as solved
β”œβ”€β”€ solved_errors.json     # Persistent storage for solved errors
└── error_log              # Your PHP error log file

πŸ› οΈ Configuration

Basic Setup

  1. Error Log Path: Place your error_log file in the same directory as index.php
  2. Permissions: Ensure web server can read error_log and write to solved_errors.json
  3. Developer Name: First-time visitors will be prompted to enter their name for tracking

Advanced Configuration

  • Theme Persistence: Uses cookies to remember user preferences
  • Section State: Remembers collapsed/expanded sections
  • Developer Identity: Persistent developer name storage
  • Error Resolution: JSON-based solved error tracking

🎯 Usage Guide

1. Viewing Errors

  • Recent Errors: View errors from the last 24 hours
  • Error Groups: Browse errors organized by file
  • Critical Errors: Focus on vendor/library issues
  • Full Error Details: Click "πŸ‘οΈ View Full" for complete error information

2. Tracking Progress

  • Mark as Solved: Click βœ“ button next to errors or files
  • Progress Bars: Visual indicators show solved vs unsolved errors
  • Master Overview: Dashboard showing overall project health

3. Managing Reoccurrences

  • Automatic Detection: System detects when solved errors occur again
  • Reoccurrence Details: Click ⚠️ badges for solve history
  • Re-marking: Easily re-mark reoccurred errors as solved

4. Customization

  • Theme Toggle: Switch between dark/light modes
  • Section Management: Collapse/expand sections as needed
  • Developer Identity: Change your name for proper attribution

πŸ”’ Security Features

  • Input Sanitization: All user inputs are properly sanitized
  • XSS Protection: HTML entities encoding for all dynamic content
  • Safe File Operations: Secure file read/write operations
  • Cookie Security: Secure cookie handling for preferences

🌟 Screenshots

Dark Theme with Progress Bars

Screenshot_002

Light Theme Dashboard

Screenshot_003

Error Details Modal

Screenshot_004

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Ahmad Yousuf - 0xAhmadYousuf

πŸš€ Support

If you found this project helpful, please consider:

  • ⭐ Starring the repository
  • πŸ› Reporting bugs
  • πŸ’‘ Suggesting new features
  • πŸ“’ Sharing with other developers

πŸ“‹ Requirements

  • PHP 8.0+ (uses match expressions and modern PHP features)
  • Web Server (Apache, Nginx, or built-in PHP server)
  • JSON Extension (usually enabled by default)
  • File System Access (read/write permissions)

πŸ”§ Troubleshooting

Common Issues

Q: Errors not showing up? A: Ensure your error_log file is in the same directory and has proper read permissions.

Q: Can't mark errors as solved? A: Check that solved_errors.json has write permissions (chmod 666).

Q: Theme not persisting? A: Verify that cookies are enabled in your browser.

Q: Progress bars not updating? A: Refresh the page after marking errors as solved.

Performance Tips

  • Large Log Files: For logs over 10MB, consider rotating or archiving old entries
  • Memory Usage: PHP memory limit may need adjustment for very large error logs
  • Caching: Browser caching is optimized for static assets

πŸ”„ Changelog

Version 2.0.0 (Latest)

  • ✨ Added segmented progress bars with diagonal stripes
  • 🎨 Implemented color-coded error type tags
  • πŸŒ™ Enhanced dark mode with colored shadows
  • πŸ” Added reoccurrence detection and tracking
  • πŸ“Š Master progress overview dashboard
  • πŸ”§ Improved error parsing and categorization

Version 1.0.0

  • πŸŽ‰ Initial release with basic error viewing
  • 🎨 Dark/light theme support
  • πŸ“ Error marking and tracking
  • πŸ“± Responsive design

Made with ❀️ by Ahmad Yousuf
πŸš€ Helping developers build better PHP applications