";
echo "PHP Version: " . phpversion() . "
";
echo "Current directory: " . __DIR__ . "
";
// Test config loading
try {
require_once __DIR__ . '/config.php';
echo "✓ config.php loaded
";
echo "Python script: " . PYTHON_SCRIPT . "
";
echo "Python venv: " . PYTHON_VENV . "
";
echo "Project root: " . PROJECT_ROOT . "
";
echo "Reports dir: " . REPORTS_DIR . "
";
echo "SSO Enabled: " . (SSO_ENABLED ? 'true' : 'false') . "
";
} catch (Exception $e) {
echo "ERROR loading config: " . $e->getMessage() . "
";
}
// Test if files exist
echo "
File checks:
";
echo "Python script exists: " . (file_exists(PYTHON_SCRIPT) ? '✓ Yes' : '✗ No') . "
";
echo "Python venv exists: " . (file_exists(PYTHON_VENV) ? '✓ Yes' : '✗ No') . "
";
echo "Reports dir exists: " . (is_dir(REPORTS_DIR) ? '✓ Yes' : '✗ No') . "
";
// Test AuthMiddleware
echo "
Auth test:
";
try {
require_once __DIR__ . '/AuthMiddleware.php';
$auth = new AuthMiddleware();
echo "✓ AuthMiddleware loaded
";
echo "SSO Enabled: " . ($auth->isSSOEnabled() ? 'Yes' : 'No') . "
";
} catch (Exception $e) {
echo "ERROR loading AuthMiddleware: " . $e->getMessage() . "
";
echo "Stack trace:
" . $e->getTraceAsString() . ""; } ?>