=== NANO BANANA PRO SERVER DIAGNOSTIC ===

1. PHP Information

PHP Version: 
Server: 
Document Root: 
Current Directory: 

2. Composer Dependencies (vendor/)

✓ vendor/ directory EXISTS
✓ Autoload: 
✓ Firebase JWT: 
✗ vendor/ directory MISSING
✗ FIX: Run 'composer install' on the server

3. Configuration Files

config.php: 
.env: 
.env.example: 

4. Critical Files Check

: 

5. Directory Permissions

uploads/: 
uploads/sessions/: 

6. Testing File Loads

Testing env_loader.php..."; try { if (file_exists(__DIR__ . '/env_loader.php')) { require_once __DIR__ . '/env_loader.php'; echo "
✓ env_loader.php loaded successfully
"; } else { echo "
✗ env_loader.php missing
"; } } catch (Exception $e) { echo "
✗ Error: " . htmlspecialchars($e->getMessage()) . "
"; } echo "
Testing config.php...
"; try { if (file_exists(__DIR__ . '/config.php')) { require_once __DIR__ . '/config.php'; echo "
✓ config.php loaded successfully
"; echo "
  GEMINI_API_KEY: " . (defined('GEMINI_API_KEY') && !empty(GEMINI_API_KEY) ? '✓ SET' : '✗ NOT SET') . "
"; echo "
  SSO_ENABLED: " . (defined('SSO_ENABLED') ? (SSO_ENABLED ? 'TRUE' : 'FALSE') : '✗ NOT DEFINED') . "
"; echo "
  SSO_TENANT_ID: " . (defined('SSO_TENANT_ID') ? (SSO_TENANT_ID ? '✓ SET' : 'EMPTY') : '✗ NOT DEFINED') . "
"; echo "
  SSO_CLIENT_ID: " . (defined('SSO_CLIENT_ID') ? (SSO_CLIENT_ID ? '✓ SET' : 'EMPTY') : '✗ NOT DEFINED') . "
"; } else { echo "
✗ config.php missing
"; } } catch (Exception $e) { echo "
✗ Error: " . htmlspecialchars($e->getMessage()) . "
"; } echo "
Testing AuthMiddleware.php...
"; try { if (file_exists(__DIR__ . '/AuthMiddleware.php')) { require_once __DIR__ . '/AuthMiddleware.php'; echo "
✓ AuthMiddleware.php loaded successfully
"; } else { echo "
✗ AuthMiddleware.php missing
"; } } catch (Exception $e) { echo "
✗ Error: " . htmlspecialchars($e->getMessage()) . "
"; } ?>

7. Next Steps

ACTION REQUIRED: Run 'composer install' on the server
ACTION REQUIRED: Copy config.example.php to config.php and add API key
✓ All critical files present - check error logs for specific PHP error

Deployment Checklist:

    1. git pull origin master
    2. composer install
    3. cp config.example.php config.php
    4. Edit config.php (add Gemini API key)
    5. cp .env.example .env
    6. mkdir -p uploads/sessions
    7. chmod 755 uploads/sessions
    8. Visit index.php