[GH-ISSUE #1089] Unable to connect to database when running setup_database script #568

Closed
opened 2026-02-25 21:35:23 +03:00 by kerem · 1 comment
Owner

Originally created by @Yannick243 on GitHub (Jun 15, 2024).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1089

🐛 Bugreport

When trying to set up the necessary tables to manage users, sessions, or settings (hm_user, hm_user_session, hm_user_settings) by running the script php ./scripts/setup_database.php, the system is using the default config values and not loading values from the .env file.
The error received is (Unable to connect to database) after multiple attempts.

Steps to reproduce

  1. Create an empty database
  2. setup the necessary variables in your .env file
    (DB_DRIVER, DB_HOST, DB_NAME, DB_USER, DB_PASS, AUTH_TYPE=DB or SESSION_TYPE=DB)
  3. Try to generate the related tables by running php ./scripts/setup_database.php
  4. You will get the error described above
Originally created by @Yannick243 on GitHub (Jun 15, 2024). Original GitHub issue: https://github.com/cypht-org/cypht/issues/1089 ## 🐛 Bugreport When trying to set up the necessary tables to manage users, sessions, or settings (hm_user, hm_user_session, hm_user_settings) by running the script `php ./scripts/setup_database.php`, the system is using the default config values and not loading values from the `.env` file. The error received is (**Unable to connect to database**) after multiple attempts. ### Steps to reproduce 1. Create an empty database 2. setup the necessary variables in your `.env` file (DB_DRIVER, DB_HOST, DB_NAME, DB_USER, DB_PASS, AUTH_TYPE=DB or SESSION_TYPE=DB) 3. Try to generate the related tables by running `php ./scripts/setup_database.php` 4. You will get the error described above
kerem closed this issue 2026-02-25 21:35:23 +03:00
Author
Owner

@josaphatim commented on GitHub (Jun 22, 2024):

Close as fixed in https://github.com/cypht-org/cypht/pull/1090

<!-- gh-comment-id:2183809633 --> @josaphatim commented on GitHub (Jun 22, 2024): Close as fixed in https://github.com/cypht-org/cypht/pull/1090
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#568
No description provided.