differ between PHP and SQL debugging

This commit is contained in:
Sebastian Mendel
2008-01-22 08:19:52 +00:00
parent bb5465e95d
commit 6207216296
6 changed files with 28 additions and 16 deletions

View File

@@ -1532,12 +1532,12 @@ $cfg['TrustedProxies'] =
<dt id="cfg_CheckConfigurationPermissions">$cfg['CheckConfigurationPermissions'] boolean</dt> <dt id="cfg_CheckConfigurationPermissions">$cfg['CheckConfigurationPermissions'] boolean</dt>
<dd> <dd>
We normally check the permissions on the configuration file to ensure We normally check the permissions on the configuration file to ensure
it's not world writable. However, phpMyAdmin could be installed on it's not world writable. However, phpMyAdmin could be installed on
a NTFS filesystem mounted on a non-Windows server, in which case the a NTFS filesystem mounted on a non-Windows server, in which case the
permissions seems wrong but in fact cannot be detected. In this case permissions seems wrong but in fact cannot be detected. In this case
a sysadmin would set this parameter to <tt>FALSE</tt>. Default is <tt>TRUE</tt>. a sysadmin would set this parameter to <tt>FALSE</tt>. Default is <tt>TRUE</tt>.
</dd> </dd>
<dt id="cfg_NaviWidth">$cfg['NaviWidth'] integer</dt> <dt id="cfg_NaviWidth">$cfg['NaviWidth'] integer</dt>
<dd>Navi frame width in pixels. See <tt>themes/themename/layout.inc.php</tt>. <dd>Navi frame width in pixels. See <tt>themes/themename/layout.inc.php</tt>.
</dd> </dd>
@@ -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 />
@@ -2023,8 +2028,8 @@ $cfg['TrustedProxies'] =
to the end of every page displayed in the main window with profiling to the end of every page displayed in the main window with profiling
statistics for that page.<br /> statistics for that page.<br />
You may need to increase the maximum execution time for this to You may need to increase the maximum execution time for this to
complete successfully.<i>Profiling was removed from the code for complete successfully.<i>Profiling was removed from the code for
version 2.9.0 due to licensing issues.</i></dd> version 2.9.0 due to licensing issues.</i></dd>
<dt id="cfg_DBG_profile_threshold">$cfg['DBG']['profile']['threshold'] float (units in milliseconds)</dt> <dt id="cfg_DBG_profile_threshold">$cfg['DBG']['profile']['threshold'] float (units in milliseconds)</dt>
<dd><b>DEVELOPERS ONLY!</b><br /> <dd><b>DEVELOPERS ONLY!</b><br />

View File

@@ -1983,7 +1983,7 @@ $cfg['NaturalOrder'] = true;
/** /**
* Initial status for sliders * Initial status for sliders
* (open | closed) * (open | closed)
* *
* @global string $cfg['InitialSlidersStatus'] * @global string $cfg['InitialSlidersStatus']
*/ */
@@ -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

View File

@@ -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
*/ */

View File

@@ -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);

View File

@@ -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);

View File

@@ -193,8 +193,8 @@ 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';
//if the setup ran fine, then do the profiling //if the setup ran fine, then do the profiling