differ between PHP and SQL debugging
This commit is contained in:
@@ -2010,7 +2010,12 @@ $cfg['TrustedProxies'] =
|
|||||||
<dt id="cfg_DBG">$cfg['DBG']</dt>
|
<dt id="cfg_DBG">$cfg['DBG']</dt>
|
||||||
<dd><b>DEVELOPERS ONLY!</b></dd>
|
<dd><b>DEVELOPERS ONLY!</b></dd>
|
||||||
|
|
||||||
<dt id="cfg_DBG_enable">$cfg['DBG']['enable'] boolean</dt>
|
<dt id="cfg_DBG_enable">$cfg['DBG']['sql'] boolean</dt>
|
||||||
|
<dd><b>DEVELOPERS ONLY!</b><br />
|
||||||
|
Enable logging queries and execution times to be displayed in the bottom
|
||||||
|
of main (right frame).</dd>
|
||||||
|
|
||||||
|
<dt id="cfg_DBG_enable">$cfg['DBG']['php'] boolean</dt>
|
||||||
<dd><b>DEVELOPERS ONLY!</b><br />
|
<dd><b>DEVELOPERS ONLY!</b><br />
|
||||||
Enable the DBG extension for debugging phpMyAdmin. Required for profiling
|
Enable the DBG extension for debugging phpMyAdmin. Required for profiling
|
||||||
the code.<br />
|
the code.<br />
|
||||||
|
@@ -2282,18 +2282,25 @@ $cfg['SQLValidator']['password'] = '';
|
|||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Developers ONLY!
|
* Developers ONLY!
|
||||||
* To use the following, please install the DBG extension from http://dd.cron.ru/dbg/
|
|
||||||
*
|
*
|
||||||
* @global array $cfg['DBG']
|
* @global array $cfg['DBG']
|
||||||
*/
|
*/
|
||||||
$cfg['DBG'] = array();
|
$cfg['DBG'] = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make the DBG stuff available
|
* Output executed queries and their execution times
|
||||||
*
|
*
|
||||||
* @global boolean $cfg['DBG']['enable']
|
* @global boolean $cfg['DBG']['enable']
|
||||||
*/
|
*/
|
||||||
$cfg['DBG']['enable'] = false;
|
$cfg['DBG']['sql'] = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make the DBG stuff available
|
||||||
|
* To use the following, please install the DBG extension from http://dd.cron.ru/dbg/
|
||||||
|
*
|
||||||
|
* @global boolean $cfg['DBG']['enable']
|
||||||
|
*/
|
||||||
|
$cfg['DBG']['php'] = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Produce profiling results of PHP
|
* Produce profiling results of PHP
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
* allways use $GLOBALS here, as this script is included by footer.inc.hp
|
* allways use $GLOBALS here, as this script is included by footer.inc.hp
|
||||||
* which can also be included from inside a function
|
* which can also be included from inside a function
|
||||||
*/
|
*/
|
||||||
if ($GLOBALS['cfg']['DBG']['enable']) {
|
if ($GLOBALS['cfg']['DBG']['php']) {
|
||||||
/**
|
/**
|
||||||
* Loads the DBG extension if needed
|
* Loads the DBG extension if needed
|
||||||
*/
|
*/
|
||||||
|
@@ -126,7 +126,7 @@ function PMA_DBI_try_query($query, $link = null, $options = 0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($GLOBALS['cfg']['DBG']['enable']) {
|
if ($GLOBALS['cfg']['DBG']['sql']) {
|
||||||
$time = microtime(true);
|
$time = microtime(true);
|
||||||
}
|
}
|
||||||
if ($options == ($options | PMA_DBI_QUERY_STORE)) {
|
if ($options == ($options | PMA_DBI_QUERY_STORE)) {
|
||||||
@@ -137,7 +137,7 @@ function PMA_DBI_try_query($query, $link = null, $options = 0)
|
|||||||
$r = mysql_query($query, $link);
|
$r = mysql_query($query, $link);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($GLOBALS['cfg']['DBG']['enable']) {
|
if ($GLOBALS['cfg']['DBG']['sql']) {
|
||||||
$time = microtime(true) - $time;
|
$time = microtime(true) - $time;
|
||||||
|
|
||||||
$hash = md5($query);
|
$hash = md5($query);
|
||||||
|
@@ -175,11 +175,11 @@ function PMA_DBI_try_query($query, $link = null, $options = 0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($GLOBALS['cfg']['DBG']['enable']) {
|
if ($GLOBALS['cfg']['DBG']['sql']) {
|
||||||
$time = microtime(true);
|
$time = microtime(true);
|
||||||
}
|
}
|
||||||
$r = mysqli_query($link, $query, $method);
|
$r = mysqli_query($link, $query, $method);
|
||||||
if ($GLOBALS['cfg']['DBG']['enable']) {
|
if ($GLOBALS['cfg']['DBG']['sql']) {
|
||||||
$time = microtime(true) - $time;
|
$time = microtime(true) - $time;
|
||||||
|
|
||||||
$hash = md5($query);
|
$hash = md5($query);
|
||||||
|
@@ -193,7 +193,7 @@ if (file_exists('./config.footer.inc.php')) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// profiling deactivated due to licensing issues
|
// profiling deactivated due to licensing issues
|
||||||
if (! empty($GLOBALS['cfg']['DBG']['enable'])
|
if (! empty($GLOBALS['cfg']['DBG']['php'])
|
||||||
&& ! empty($GLOBALS['cfg']['DBG']['profile']['enable'])) {
|
&& ! empty($GLOBALS['cfg']['DBG']['profile']['enable'])) {
|
||||||
//run the basic setup code first
|
//run the basic setup code first
|
||||||
require_once './libraries/dbg/setup.php';
|
require_once './libraries/dbg/setup.php';
|
||||||
|
Reference in New Issue
Block a user