| Server IP : 10.200.247.200 / Your IP : 216.73.217.19 Web Server : Apache System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : jeremy ( 1001) PHP Version : 8.4.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/development/callings.lvsaints.com/ |
Upload File : |
<?php
// ---------------------------------------------------------------------------
// Database configuration.
//
// No live credentials live in this file. They are read from a secrets file
// that sits OUTSIDE the web root and exports them as environment variables
// (via putenv). We reuse the shared DB server + user defined there
// (TWILIO_DB_*), but connect to our OWN database, "village_callings".
//
// That database must exist and the user must be granted access to it, e.g.:
//
// CREATE DATABASE village_callings CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
// GRANT ALL PRIVILEGES ON village_callings.* TO '<the TWILIO_DB_USER>'@'%';
// FLUSH PRIVILEGES;
//
// The web-server user (e.g. www-data) must be able to read the secrets file.
// ---------------------------------------------------------------------------
$secrets = '/var/www/.aws/callings_env.php';
if (is_readable($secrets)) {
require_once $secrets; // runs putenv('DB_HOST=...'), etc.
}
return [
'db_host' => getenv('DB_HOST') ?: '127.0.0.1',
'db_port' => (int) (getenv('DB_PORT') ?: 3306),
'db_name' => 'village_callings', // our own DB name — not a secret
'db_user' => getenv('DB_USER') ?: '',
'db_pass' => getenv('DB_PASS') ?: '',
// Enforces the Secure flag on the session cookie. Requires the site to be
// served over HTTPS — over plain HTTP the login cookie won't be sent.
'https_only' => true,
];