Replace database config with fallback
This commit is contained in:
parent
9dbad9cd51
commit
db9fd8b5df
1 changed files with 4 additions and 4 deletions
|
|
@ -11,11 +11,11 @@ ini_set('display_errors', 0); // Keep disabled in production so errors don't cor
|
||||||
// 2. DATABASE CONFIGURATION (Aiven Cloud Connection Matrix)
|
// 2. DATABASE CONFIGURATION (Aiven Cloud Connection Matrix)
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
// Fall back to standard local development values if variables aren't injected by Vercel
|
// Fall back to standard local development values if variables aren't injected by Vercel
|
||||||
$db_host = getenv('DB_HOST') ?: 'nostolgagram-nostolgagram.i.aivencloud.com';
|
$db_host = getenv('DB_HOST') ?: '127.0.0.1';
|
||||||
$db_port = getenv('DB_PORT') ?: '3306'; // Default MySQL port (Aiven will overwrite this with 23006 via Vercel)
|
$db_port = getenv('DB_PORT') ?: '3306';
|
||||||
$db_user = getenv('DB_USER') ?: 'avnadmin';
|
$db_user = getenv('DB_USER') ?: 'root';
|
||||||
$db_pass = getenv('DB_PASS') ?: '';
|
$db_pass = getenv('DB_PASS') ?: '';
|
||||||
$db_name = 'defaultdb'; // Aiven's default workspace name
|
$db_name = 'defaultdb';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Open a secure database link using the fast, modern PHP Data Objects (PDO) framework
|
// Open a secure database link using the fast, modern PHP Data Objects (PDO) framework
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue