config.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /* Note: Default SQL config connects to test environment db. */
  3. $_db = [
  4. 'login' => [ // Login Server Database
  5. 'host' => 'mysql.xonos.io',
  6. 'port' => NULL, // Set if not 3306
  7. 'user' => 'eq2dev',
  8. 'pass' => '%p3ck4p0t!bUk_',
  9. 'dbnm' => 'eq2ls' //Database Name
  10. ],
  11. 'world' => [ // World Server Database
  12. 'host' => 'mysql.xonos.io',
  13. 'port' => NULL, // Set if not 3306
  14. 'user' => 'eq2dev',
  15. 'pass' => '%p3ck4p0t!bUk_',
  16. 'dbnm' => 'eq2emu' //Database Name
  17. ]
  18. ];
  19. /* Config */
  20. ini_set("mysql.trace_mode", "0"); //Ensures SQL_FOUND_ROWS works for pagination.
  21. /* Globals */
  22. DEFINE('_sid', 'eq2emulabs'); //Site ID (used in sessions)
  23. DEFINE('_ver', '1.0.1'); //EQ2EMU Labs Version
  24. DEFINE('_debug', true); //Enables visible PHP errors & warnings.
  25. /* ERROR VISIBILITY DURING DEVELOPMENT */
  26. if(_debug) {
  27. ini_set('display_errors', 1);
  28. ini_set('display_startup_errors', 1);
  29. error_reporting(E_ALL);
  30. }
  31. /* MYSQL SETUP */
  32. DEFINE('_world', 'Zeklabs'); //Set this to your primary world name.
  33. /* Login Server & World Server DB Connections */
  34. $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']);
  35. $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']);
  36. $login->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  37. $world->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  38. ?>