Index: trunk/tools/debug_sample.php =================================================================== diff -u -N -r836 -r842 --- trunk/tools/debug_sample.php (.../debug_sample.php) (revision 836) +++ trunk/tools/debug_sample.php (.../debug_sample.php) (revision 842) @@ -2,12 +2,12 @@ // uncomment next line to enable sql logging define('ADODB_OUTP', 'SQLLog'); - // sql logging to screen + define('DOC_ROOT', $_SERVER['DOCUMENT_ROOT']); define('WINDOWS_ROOT', 'w:'); define('WINDOWS_EDITOR', 'c:\Program Files\Zend\ZendStudio-4.0Beta\bin\ZDE.exe %F'); // %F - filename, %L - line number + define('DEBUG_CSS', 'http://'.$_SERVER['HTTP_HOST'].'/in-portal/admin/include/debug_styles.css'); - //define('SQL_TO_SCREEN', 1); // output sql queries to screen // sql logging to file @@ -17,38 +17,25 @@ define('SQL_OVERWRITE', 1); // overwrite or not sql_log file // various levels of debugging + define('SHOW_REQUEST', 1); + define('FRONT_SHOW_REQUEST', 2); - // Admin: - define('KERNEL_ACTIONS', 1); // only kernel - define('MODULE_ACTIONS', 2); // only modules - define('SEARCH_ACTIONS', 4); // kernel & modules - define('SHOW_REQUEST', 8); // show formatted $_REQUEST array passed to script (GE - $_GET, PO - $_POST, CO - $_COOKIE) - - // Front: - define('FRONT_KERNEL_ACTIONS', 16); - define('FRONT_SHOW_REQUEST', 32); - define('DEBUG_MODE', 1); // global debugging - define('DEBUG_ACTIONS', KERNEL_ACTIONS + SHOW_REQUEST + FRONT_KERNEL_ACTIONS + FRONT_SHOW_REQUEST); + define('DEBUG_ACTIONS', SHOW_REQUEST + FRONT_SHOW_REQUEST); //define('DEBUG_HELP', 1); // allow to add missing help - + // For local license testing - define('GET_LICENSE_URL', 'http://maris.prod.intechnic.lv/in-business/license.php'); + //define('GET_LICENSE_URL', 'http://maris.prod.intechnic.lv/in-business/license.php'); if( defined('DEBUG_MODE') && constant('DEBUG_MODE') == 1 ) { - error_reporting(E_ALL); ini_set('display_errors', 1); } - ini_set('max_execution_time', '30'); - //ini_set('memory_limit', 512000000); + function SQLLog($msg, $newline = true) { static $file_reset = false; - //$LocationMessage = 'Called from file ['.basename($_SERVER['PHP_SELF']).']'; - //if($msg != $LocationMessage) SQLLog($LocationMessage); - $db =& GetADODBConnection(); // telestial specific: begin static $prefix = ''; @@ -93,10 +80,11 @@ */ function trace() { - $trace_results = debug_backtrace(); + die('Error: Depricated call. Use $debugger->appendTrace(); instead'); + /*$trace_results = debug_backtrace(); array_shift($trace_results); echo 'Called from ['.$trace_results[0]['function'].']
'; - print_pre($trace_results); + print_pre($trace_results);*/ } function DebugByFile()