<?php
$conf = json_decode(file_get_contents("/etc/conf/local.conf"), 1);
define("DB_USER", $conf["mysql-user"]);
define("DB_HOST", $conf["host"]);
define("HOST", $conf["host"]);
define("DB_PASS", $conf["mysql-password"]);
define("DB_NAME", $conf["db-name"]);

//define("DB_USER", "mysqlUser");
//define("DB_HOST", "dev.xenonapps.com");
//define("DB_PASS", "1k23k4k55j");
//define("DB_NAME", "green_up_vt");
define("BASE_INCLUDE", dirname(__FILE__) );
?>

<?php
$conf = json_decode(file_get_contents("/etc/conf/local.conf"), 1);
/* Fix for conf['host'] being an IP Address within a VirtualHost by Name setup
*/
$conf['host'] = $_SERVER['SERVER_NAME'];
define("DB_USER", $conf["mysql-user"]);
define("DB_HOST", $conf["host"]);
define("HOST", $conf["host"]);
define("DB_PASS", $conf["mysql-password"]);
define("DB_NAME", $conf["db-name"]);

//define("DB_USER", "mysqlUser");
//define("DB_HOST", "dev.xenonapps.com");
//define("DB_PASS", "1k23k4k55j");
//define("DB_NAME", "green_up_vt");
define("BASE_INCLUDE", dirname(__FILE__) );
?>

Fix for Host IP in NamedVirtualHost setup
Fix for Host IP in NamedVirtualHost setup

The servers use an IP Address for the host in the configuration details,
but we're running a NamedVirtualHost setup, so we need to have a
resolution for the curl call done by the index.php during login.

Pulling ServerName as the authoritive configuration for host name.
