Bhargavi staging on royalitpark.org
=====================================

Your folder: public_html/bhargavi_staging/

STEP 1 — Test PHP (no CodeIgniter)
----------------------------------
Open in browser:
  https://YOUR-DOMAIN/bhargavi_staging/public/ok.php

If ok.php also shows 500 → .htaccess or php.ini problem (see Step 4).

STEP 2 — Test app boot
----------------------
  https://YOUR-DOMAIN/bhargavi_staging/public/diag.php

Fix anything marked MISSING or FAILED, then delete diag.php and ok.php.

STEP 3 — Document root (pick ONE setup)
---------------------------------------

Option A — Subfolder URL (most likely your setup)
  URL: https://domain.com/bhargavi_staging/public/
  Document root: public_html  (default)
  Keep root .htaccess and public/.htaccess as uploaded.
  RewriteBase in public/.htaccess must be:
    RewriteBase /bhargavi_staging/public/

Option B — Domain points to public folder
  URL: https://staging.yourdomain.com/
  Document root: public_html/bhargavi_staging/public
  In public/.htaccess change RewriteBase to:
    RewriteBase /

STEP 4 — If still 500 on ok.php
-------------------------------
1. cPanel → MultiPHP Manager → PHP 8.2 or 8.3
2. Rename public_html/php.ini to php.ini.bak (bad php.ini breaks all sites)
3. Temporarily rename public/.htaccess to .htaccess.bak
4. Open ok.php again — if it works, the old .htaccess was the problem
5. Upload the new public/.htaccess from this project

STEP 5 — Required folders on server
-----------------------------------
- vendor/          (run composer install locally, upload vendor/)
- writable/        chmod 775 (session, cache, logs inside too)

STEP 6 — Upload permission denied
---------------------------------
chmod 755 app/Config
chmod 644 app/Config/Database.php
Or upload to home folder and Move in File Manager.
