Fix for #2141 - the web interface does not start in the packaged version. The problem was that the CC_DBC variable was not initialized. Also fixed the UI_VERSION_FULLNAME.
This commit is contained in:
parent
56c61a21cf
commit
43cf1716e8
2 changed files with 123 additions and 111 deletions
|
@ -11,7 +11,6 @@ if (UI_DEBUG) {
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
define('UI_VERSION_FULLNAME', 'Campcaster 1.1.1');
|
|
||||||
define('UI_TESTSTREAM_MU3_TMP', 'img/listen.m3u');
|
define('UI_TESTSTREAM_MU3_TMP', 'img/listen.m3u');
|
||||||
|
|
||||||
// Local settings
|
// Local settings
|
||||||
|
@ -115,9 +114,9 @@ define('UI_PL_ELEM_FADEOUT', 'fadeOut');
|
||||||
define('UI_BACKUPTOKEN_KEY', 'backupToken');
|
define('UI_BACKUPTOKEN_KEY', 'backupToken');
|
||||||
define('UI_RESTORETOKEN_KEY', 'restoreToken');
|
define('UI_RESTORETOKEN_KEY', 'restoreToken');
|
||||||
|
|
||||||
//require_once('PEAR.php');
|
|
||||||
require_once('../../../storageServer/var/conf.php');
|
require_once('../../../storageServer/var/conf.php');
|
||||||
define('UI_VERSION', CAMPCASTER_VERSION);
|
define('UI_VERSION', CAMPCASTER_VERSION);
|
||||||
|
define('UI_VERSION_FULLNAME', 'Campcaster '.UI_VERSION);
|
||||||
|
|
||||||
// extent config
|
// extent config
|
||||||
$CC_CONFIG = array_merge($CC_CONFIG,
|
$CC_CONFIG = array_merge($CC_CONFIG,
|
||||||
|
|
|
@ -11,7 +11,6 @@ if (UI_DEBUG) {
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
define('UI_VERSION_FULLNAME', 'Campcaster 1.1.1');
|
|
||||||
define('UI_TESTSTREAM_MU3_TMP', 'img/listen.m3u');
|
define('UI_TESTSTREAM_MU3_TMP', 'img/listen.m3u');
|
||||||
|
|
||||||
// Scheduler
|
// Scheduler
|
||||||
|
@ -121,6 +120,7 @@ define('UI_RESTORETOKEN_KEY', 'restoreToken');
|
||||||
|
|
||||||
require_once('storage_server/var/conf.php');
|
require_once('storage_server/var/conf.php');
|
||||||
define('UI_VERSION', CAMPCASTER_VERSION);
|
define('UI_VERSION', CAMPCASTER_VERSION);
|
||||||
|
define('UI_VERSION_FULLNAME', 'Campcaster '.UI_VERSION);
|
||||||
|
|
||||||
// extent config
|
// extent config
|
||||||
$CC_CONFIG = array_merge($CC_CONFIG,
|
$CC_CONFIG = array_merge($CC_CONFIG,
|
||||||
|
@ -150,25 +150,38 @@ $CC_CONFIG = array_merge($CC_CONFIG,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
require_once dirname(__FILE__).'/ui_base.inc.php';
|
require_once(dirname(__FILE__).'/ui_base.inc.php');
|
||||||
require_once dirname(__FILE__).'/ui_scratchpad.class.php';
|
require_once(dirname(__FILE__).'/ui_scratchpad.class.php');
|
||||||
require_once dirname(__FILE__).'/ui_playlist.class.php';
|
require_once(dirname(__FILE__).'/ui_playlist.class.php');
|
||||||
require_once dirname(__FILE__).'/ui_search.class.php';
|
require_once(dirname(__FILE__).'/ui_search.class.php');
|
||||||
require_once dirname(__FILE__).'/ui_browse.class.php';
|
require_once(dirname(__FILE__).'/ui_browse.class.php');
|
||||||
require_once dirname(__FILE__).'/ui_hubBrowse.class.php';
|
require_once(dirname(__FILE__).'/ui_hubBrowse.class.php');
|
||||||
require_once dirname(__FILE__).'/ui_hubSearch.class.php';
|
require_once(dirname(__FILE__).'/ui_hubSearch.class.php');
|
||||||
require_once dirname(__FILE__).'/ui_transfers.class.php';
|
require_once(dirname(__FILE__).'/ui_transfers.class.php');
|
||||||
require_once 'storage_server/var/GreenBox.php';
|
require_once('storage_server/var/GreenBox.php');
|
||||||
require_once dirname(__FILE__).'/formmask/generic.inc.php';
|
require_once(dirname(__FILE__).'/formmask/generic.inc.php');
|
||||||
require_once dirname(__FILE__).'/ui_calendar.class.php';
|
require_once(dirname(__FILE__).'/ui_calendar.class.php');
|
||||||
require_once dirname(__FILE__).'/ui_scheduler.class.php';
|
require_once(dirname(__FILE__).'/ui_scheduler.class.php');
|
||||||
require_once dirname(__FILE__).'/ui_subjects.class.php';
|
require_once(dirname(__FILE__).'/ui_subjects.class.php');
|
||||||
require_once dirname(__FILE__).'/ui_jscom.php';
|
require_once(dirname(__FILE__).'/ui_jscom.php');
|
||||||
require_once dirname(__FILE__).'/ui_exchange.class.php';
|
require_once(dirname(__FILE__).'/ui_exchange.class.php');
|
||||||
|
|
||||||
require_once('DB.php');
|
require_once('DB.php');
|
||||||
require_once('HTML/QuickForm.php');
|
require_once('HTML/QuickForm.php');
|
||||||
|
|
||||||
|
// Connect to the database
|
||||||
|
$CC_DBC = DB::connect($CC_CONFIG['dsn'], TRUE);
|
||||||
|
if (PEAR::isError($CC_DBC)) {
|
||||||
|
echo "Could not connect to database. Your current configuration is:<br>";
|
||||||
|
echo "<table border=1>";
|
||||||
|
echo "<tr><td>Host name:</td><td>".$CC_CONFIG['dsn']['hostspec']."</td></tr>";
|
||||||
|
echo "<tr><td>Database name:</td><td>".$CC_CONFIG['dsn']['database']."</td></tr>";
|
||||||
|
echo "<tr><td>User name:</td><td>".$CC_CONFIG['dsn']['username']."</td></tr>";
|
||||||
|
echo "</table>";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||||
|
|
||||||
//PEAR::setErrorHandling(PEAR_ERROR_TRIGGER, E_USER_WARNING);
|
//PEAR::setErrorHandling(PEAR_ERROR_TRIGGER, E_USER_WARNING);
|
||||||
//PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'errCallBack');
|
//PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'errCallBack');
|
||||||
PEAR::setErrorHandling(PEAR_ERROR_RETURN);
|
PEAR::setErrorHandling(PEAR_ERROR_RETURN);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue