[GH-ISSUE #847] DB auth has problems with the new dotenv config (fix included) #494

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

Originally created by @jasonmunro on GitHub (Dec 21, 2023).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/847

Originally assigned to: @Shadow243 on GitHub.

Found and fixed an issue where my dotenv values were not being used for database authentication. Just a naming mismatch in the new config code. The following fixes the issue:

diff --git a/config/database.php b/config/database.php
index c7ee2187..2e6a1499 100644
--- a/config/database.php
+++ b/config/database.php
@@ -17,7 +17,7 @@ return [
     | Connection type. Can be "host" to connect to a hostname, or "socket" to
     | connect to a unix socket.
     */
-    'db_conn_type' => env('DB_CONNECTION_TYPE', 'host'),
+    'db_connection_type' => env('DB_CONNECTION_TYPE', 'host'),

     /*
     |
@@ -63,5 +63,5 @@ return [
     |
     | Database type. can be any supported PDO driver ; (http://php.net/manual/en/pdo.drivers.php)
     */
-    'db_driver' => env('DRIVER','mysql')
+    'db_driver' => env('DB_DRIVER','mysql')
 ];
Originally created by @jasonmunro on GitHub (Dec 21, 2023). Original GitHub issue: https://github.com/cypht-org/cypht/issues/847 Originally assigned to: @Shadow243 on GitHub. Found and fixed an issue where my dotenv values were not being used for database authentication. Just a naming mismatch in the new config code. The following fixes the issue: ``` diff --git a/config/database.php b/config/database.php index c7ee2187..2e6a1499 100644 --- a/config/database.php +++ b/config/database.php @@ -17,7 +17,7 @@ return [ | Connection type. Can be "host" to connect to a hostname, or "socket" to | connect to a unix socket. */ - 'db_conn_type' => env('DB_CONNECTION_TYPE', 'host'), + 'db_connection_type' => env('DB_CONNECTION_TYPE', 'host'), /* | @@ -63,5 +63,5 @@ return [ | | Database type. can be any supported PDO driver ; (http://php.net/manual/en/pdo.drivers.php) */ - 'db_driver' => env('DRIVER','mysql') + 'db_driver' => env('DB_DRIVER','mysql') ]; ```
kerem closed this issue 2026-02-25 21:35:10 +03:00
Author
Owner

@Shadow243 commented on GitHub (Dec 21, 2023):

PR: https://github.com/cypht-org/cypht/pull/852

<!-- gh-comment-id:1866765553 --> @Shadow243 commented on GitHub (Dec 21, 2023): PR: https://github.com/cypht-org/cypht/pull/852
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#494
No description provided.