Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Help me in solving HTTP ERROR 500

    Installing Bagisto
    2
    2
    52
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      umarbuilds last edited by

      I am getting HTTP Error 500, I am new to programming below is chatgpt generated steps what and how I have done, I am doing this on shared hosting, the message is little long, any help to this non coder is highly appreciated.

      📌 PHASE 1 — File Upload & Folder Structure

      Created a folder named bagisto inside the home directory.

      Your hosting structure looked like:

      /home/sites/.../
      public_html/
      bagisto/

      Uploaded Bagisto 2.3 source code into:

      /home/.../bagisto/

      That folder contains:

      app

      bootstrap

      config

      public

      vendor (after composer install)

      storage

      📌 PHASE 2 — SSH SETUP

      Created a new SSH key on local system (old one removed).

      Added SSH public key to hosting panel.

      Successfully logged into SSH via:

      ssh <your-user>@ssh.gb.stackcp.com

      📌 PHASE 3 — Composer Install

      Navigated to project folder:

      cd ~/bagisto

      Installed dependencies:

      /usr/php83/usr/bin/php /usr/local/bin/composer install --no-dev --optimize-autoloader

      This generated the vendor folder.

      📌 PHASE 4 — Environment Setup

      Copied the environment file:

      cp .env.example .env

      Completely rewrote .env with the correct values such as:

      APP_NAME

      APP_URL

      APP_ENV

      DB_HOST

      DB_DATABASE = the auto-suffixed database name from hosting panel

      DB_USERNAME = the DB user created in panel

      DB_PASSWORD = the DB user password

      Queue settings

      Mail defaults

      (All sensitive data removed)

      📌 PHASE 5 — Database Preparation

      Verified the real database name in hosting panel
      (It had an automatically generated suffix).

      Attached the DB user to the database and granted ALL PRIVILEGES.

      📌 PHASE 6 — Laravel Commands

      All run using the PHP 8.3 binary:

      Generated application key:

      /usr/php83/usr/bin/php artisan key:generate

      Created queue table:

      /usr/php83/usr/bin/php artisan queue:table

      Ran migrations and seeders:

      /usr/php83/usr/bin/php artisan migrate --seed

      ✔ Migrations succeeded
      ✔ Seeders executed
      ✔ All tables created

      Created storage symlink:

      /usr/php83/usr/bin/php artisan storage:link

      Cleared caches:

      /usr/php83/usr/bin/php artisan optimize:clear

      📌 PHASE 7 — Web Root Configuration

      Set document root for the domain to:

      bagisto/public

      (Hosting system automatically prepends the full server path.)

      ⚠️ THE ONLY REAL ERROR FOUND (From your logs)

      Your Bagisto app tried to connect to database:

      bagisto_db

      But your actual database name is:

      bagisto_db-<random-suffix>

      So MySQL blocked access and caused the 500 internal server error.

      1 Reply Last reply Reply Quote 0
      • R
        rishabh_webkul19 last edited by

        Hello @umarbuilds

        It looks like you did everything correctly the only actual issue is the database name mismatch.

        Your Bagisto installation is trying to connect to:

        bagisto_db

        But on your hosting panel, the real database name is something like:

        bagisto_db-xxxxx (with an auto-generated suffix)

        Because the DB name in .env does not match the real one, MySQL rejects the connection, which triggers the HTTP 500 error.

        Kindly let us know if you have further queries.

        Regards

        1 Reply Last reply Reply Quote 0
        • First post
          Last post