12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- /* Note: Default SQL config connects to test environment db. */
- $_db = [
- 'login' => [ // Login Server Database
- 'host' => 'mysql.xonos.io',
- 'port' => NULL, // Set if not 3306
- 'user' => 'eq2dev',
- 'pass' => '%p3ck4p0t!bUk_',
- 'dbnm' => 'eq2ls' //Database Name
- ],
- 'world' => [ // World Server Database
- 'host' => 'mysql.xonos.io',
- 'port' => NULL, // Set if not 3306
- 'user' => 'eq2dev',
- 'pass' => '%p3ck4p0t!bUk_',
- 'dbnm' => 'eq2emu' //Database Name
- ]
- ];
- /* Config */
- ini_set("mysql.trace_mode", "0"); //Ensures SQL_FOUND_ROWS works for pagination.
-
- /* Globals */
- DEFINE('_sid', 'eq2emulabs'); //Site ID (used in sessions)
- DEFINE('_ver', '1.0.0'); //EQ2EMU Labs Version
- DEFINE('_debug', true); //Enables visible PHP errors & warnings.
-
- /* ERROR VISIBILITY DURING DEVELOPMENT */
- if(_debug) {
- ini_set('display_errors', 1);
- ini_set('display_startup_errors', 1);
- error_reporting(E_ALL);
- }
-
- /* MYSQL SETUP */
-
- DEFINE('_world', 'Zeklabs'); //Set this to your primary world name.
-
- /* Login Server & World Server DB Connections */
- $login = new PDO('mysql:host='.$_db['login']['host'].($_db['login']['port'] ? ';port='.$_db['login']['port']:NULL).';dbname='.$_db['login']['dbnm'], $_db['login']['user'], $_db['login']['pass']);
- $world = new PDO('mysql:host='.$_db['world']['host'].($_db['world']['port'] ? ';port='.$_db['world']['port']:NULL).';dbname='.$_db['world']['dbnm'], $_db['world']['user'], $_db['world']['pass']);
-
- $login->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- $world->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- ?>
|