AI OFFICE v4 — DIRECT EXTRACTION / TROUBLESHOOTING EDITION

TARGET: https://bananatech-access.com/ai-office/

1. BACK UP your current public_html/ai-office directory AND existing AI Office database before replacing files. DO NOT delete your current _private/config.php if it contains working settings.
2. Upload this ZIP to public_html/ai-office and extract IN PLACE. There is no extra project or public directory. If replacing a previous installation, preserve _private/config.php and ensure no old duplicate files remain.
3. Open /ai-office/check.php to verify PHP, PDO MySQL, cURL and file presence. This check does not reveal passwords or access databases.
4. For FIRST INSTALLATION ONLY, create a NEW EMPTY AI Office database with a user allowed to CREATE tables, and a DIFFERENT SELECT-ONLY user for the existing fobbnbll_sales_tracker database. Open /ai-office/setup.php and complete the form.
5. If setup says CONFIGURATION ALREADY EXISTS, the installer is deliberately locked. Try /ai-office/login.php. If it returns HTTP 500, check cPanel Metrics > Errors; fix the actual cause before considering reinstall. Back up config and database before any reset.
6. After successful installation, DELETE setup.php and check.php from public_html/ai-office.
7. Dashboard uses existing sales, stores and quotas. Sales Tracker remains untouched. AI chat requires a separate Windows Python gateway and a secure authenticated HTTPS tunnel.
8. SECURITY: _private/.htaccess denies web access. Stronger deployment: move _private outside public_html and update require paths. Do not publish SQL backups, credentials, or Python .env. Keep directory 755 and PHP files 644.
9. This ZIP does not include actual database passwords. Production deployment and AI gateway connection require your own configuration.
10. If errors persist, send the relevant cPanel error-log lines, with secrets redacted.
