mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Added debug ability
This commit is contained in:
@@ -159,5 +159,9 @@ if (!defined('LDB_HOST')) define('LDB_HOST', DB_HOST);
|
||||
if (!defined('LDB_NAME')) define('LDB_NAME', DB_NAME);
|
||||
if (!defined('LDB_TYPE')) define('LDB_TYPE', DB_TYPE);
|
||||
|
||||
/**
|
||||
* Debugging
|
||||
*/
|
||||
if (!defined('DEBUG')) define('DEBUG',false);
|
||||
|
||||
?>
|
||||
|
||||
14
db.inc.php
14
db.inc.php
@@ -52,6 +52,16 @@ if (!(include_once(ADODB_PATH . 'session/adodb-session2.php')))
|
||||
print "<p>ERROR: Please modify config.inc.php for ADODB_PATH to point to your ADODb installation</p>";
|
||||
}
|
||||
|
||||
define('ADODB_OUTP',"outputDebug");
|
||||
|
||||
/**
|
||||
* Output for debugging
|
||||
*/
|
||||
function outputDebug($text,$newline)
|
||||
{
|
||||
error_log($text,0);
|
||||
}
|
||||
|
||||
//if PEAR not installed:
|
||||
set_include_path("."); //TEMP ONLY
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__).'/include/pear/');
|
||||
@@ -60,13 +70,13 @@ set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__).'/inclu
|
||||
$db = newADOConnection(DB_TYPE);
|
||||
$db->Connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
|
||||
$db->SetFetchMode(ADODB_FETCH_ASSOC);
|
||||
|
||||
if (DEBUG == true) $db->debug = true;
|
||||
|
||||
//global database variable for limesurvey
|
||||
$ldb = newADOConnection(LDB_TYPE);
|
||||
$ldb->Connect(LDB_HOST, LDB_USER, LDB_PASS, LDB_NAME);
|
||||
$ldb->SetFetchMode(ADODB_FETCH_ASSOC);
|
||||
|
||||
if (DEBUG == true) $ldb->debug = true;
|
||||
|
||||
//store session in database (see sessions2 table)
|
||||
ADOdb_Session::config(DB_TYPE, DB_HOST, DB_USER, DB_PASS, DB_NAME,$options=false);
|
||||
|
||||
Reference in New Issue
Block a user