<?php
// Enable error display
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

echo "<h2>Testing summary.php</h2>";
echo "<hr>";

// Check if summary.php exists
$file = __DIR__ . '/summary.php';

if (file_exists($file)) {
    echo "✓ File exists: $file<br><br>";
    
    // Set up session to simulate logged-in user
    session_start();
    $_SESSION['uname'] = 'stanlee';
    
    echo "<h3>Attempting to load summary.php...</h3>";
    echo "<p>If this page crashes, the error is in summary.php</p>";
    echo "<hr>";
    
    // Try to include summary.php
    include($file);
    
} else {
    echo "✗ File NOT found: $file<br>";
    echo "<p>This is why you're getting a 500 error - the file doesn't exist!</p>";
}
?>
