Sindbad~EG File Manager

Current Path : /home/copmadinaarea/thecopmadinaarea.org/portal/
Upload File :
Current File : /home/copmadinaarea/thecopmadinaarea.org/portal/DEPLOYMENT_CHECKLIST.txt

════════════════════════════════════════════════════════════════
  LIVE SERVER DEPLOYMENT - QUICK CHECKLIST (500 Error Fix)
════════════════════════════════════════════════════════════════

✅ ALREADY FIXED:
[✓] .htaccess hardcoded paths removed
[✓] BASE_URL auto-detection enabled
[✓] Database credentials configured

────────────────────────────────────────────────────────────────
STEP 1: UPLOAD TO LIVE SERVER
────────────────────────────────────────────────────────────────
[ ] Upload all files via FTP/cPanel File Manager
[ ] Verify these files uploaded:
    [ ] .htaccess
    [ ] config/config.php
    [ ] config/database.php
    [ ] vendor/ folder (if using composer)
    [ ] All module folders

────────────────────────────────────────────────────────────────
STEP 2: RUN DIAGNOSTIC
────────────────────────────────────────────────────────────────
[ ] Visit: https://yourdomain.com/server_check.php
[ ] Check for RED errors - fix these first:
    [ ] PHP version 7.4+
    [ ] Required extensions enabled
    [ ] Database connection working
    [ ] File permissions correct

────────────────────────────────────────────────────────────────
STEP 3: FIX COMMON ISSUES
────────────────────────────────────────────────────────────────

IF 500 ERROR PERSISTS:

Option A - File Permissions (Most Common)
[ ] Set folder permissions to 755
[ ] Set file permissions to 644  
[ ] Set uploads/ to 777
    Commands: chmod 755 -R /path/to/app
             chmod 777 /path/to/app/uploads

Option B - .htaccess Issues
[ ] Try minimal .htaccess:
    1. Backup: mv .htaccess .htaccess.backup
    2. Rename: mv .htaccess.minimal .htaccess
    3. Test site

Option C - PHP Settings
[ ] If host doesn't support php_value in .htaccess:
    - Edit .htaccess
    - Comment out lines 27-30 (php_value lines)
    - Use cPanel PHP settings instead

Option D - Enable Error Display
[ ] Edit config/config.php
[ ] Add at top after <?php:
    ini_set('display_errors', 1);
    error_reporting(E_ALL);
[ ] Reload page to see actual error

────────────────────────────────────────────────────────────────
STEP 4: DATABASE SETUP
────────────────────────────────────────────────────────────────
[ ] Create database: copmadinaarea_portal
[ ] Create user: copmadinaarea_portal
[ ] Set password: Swanzy10@@@
[ ] Grant ALL PRIVILEGES to user
[ ] Import database SQL file via phpMyAdmin

────────────────────────────────────────────────────────────────
STEP 5: TEST APPLICATION
────────────────────────────────────────────────────────────────
[ ] Visit homepage - loads without error
[ ] Login page works
[ ] Can login with credentials
[ ] Dashboard displays
[ ] Try accessing a module
[ ] File upload test (if applicable)

────────────────────────────────────────────────────────────────
STEP 6: SECURITY & CLEANUP
────────────────────────────────────────────────────────────────
[ ] DELETE server_check.php
[ ] DELETE test_base_url.php
[ ] Remove error display from config.php
[ ] Verify .htaccess security rules active
[ ] Enable SSL certificate (HTTPS)

════════════════════════════════════════════════════════════════
TROUBLESHOOTING COMMANDS
════════════════════════════════════════════════════════════════

Check PHP version:
  php -v

Check error logs:
  tail -f ~/logs/error.log
  OR in cPanel: Error Logs section

Test database connection:
  Visit: server_check.php (Section 6)

Check file permissions:
  ls -la /path/to/application

Fix permissions:
  chmod 755 -R application/
  chmod 777 uploads/

════════════════════════════════════════════════════════════════
NEED HELP?
════════════════════════════════════════════════════════════════

See LIVE_SERVER_DEPLOYMENT.md for detailed explanations

Common Error Solutions:
- "Permission denied" → Fix file permissions
- "Failed opening required" → Missing files, check upload
- "Call to undefined function" → Missing PHP extension
- "Connection refused" → Database credentials wrong
- "RewriteEngine" error → mod_rewrite not enabled

════════════════════════════════════════════════════════════════

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists