version=pmwiki-2.3.9 ordered=1 urlencoded=1
author=simon
charset=UTF-8
csum=hlt php, hlt html (+58)
ctime=1156512549
name=PmWiki.DebugVariables
rev=19
targets=PmWiki.DebugVariables,Cookbook.Stopwatch,PmWiki.AvailableActions,PmWiki.BasicVariables
text=(:Summary:variables useful for debugging:)%0a%0a:$AbortFunction:A custom function name replacing the built-in %25hlt php%25@@Abort()@@ function. %0a:$EnableDiag:%0a>>indent%3c%3c%0a(:include AvailableActions#BEGENABLEDIAG#ENDENABLEDIAG:)%0a>>%3c%3c%0a%0a:$EnableMarkupDiag:By default, the "ruleset" action will display all markup rules, and the old-format patterns requiring update for PHP 7 will list with their files and line numbers. Setting $EnableMarkupDiag to 1 will list files and line numbers of all patterns. Note, this needs to be set early in @@config.php@@ before a %25hlt php%25@@Markup()@@ call or before including a recipe.%0a%0a:$EnableIMSCaching:A variable which, when set equal to 1, recognizes the "If-Modified-Since" header coming from browsers and allows browsers to use locally cached pages.  Disabled by default to help the administrator customize its page without needing permanent reloading.%0a%0a:$EnableStopWatch:This activates an internal stopwatch that shows how long it takes to render a page. (If you have a wiki that composes a HTML page from multiple pages, such as a normal layout with a sidebar, you'll get separate timings for each subpage and for the total page.)%0a%0a: :The timings can be displayed by adding %25hlt html%25[@%3c!--function:StopWatchHTML 1-->@] in the wiki template.%0a%0a: :Valid values are:%0a        $EnableStopWatch = 0; # No timings (the default). No HTML will be generated.%0a        $EnableStopWatch = 1; # Wall-clock timings only.%0a        $EnableStopWatch = 2; # Wall-clock and CPU usage timings. Won't work on Windows.%0a%0a: :See [[(Cookbook:)Stopwatch]] for more details.%0a%0aSee also:%0a* [[AvailableActions#refcount|@@scripts/refcount.php@@]] is useful for debugging%0a%0a%0a----%0a>>faq%3c%3c[[#faq]]%0aQ:Is it possible for someone with admin privileges to always have access to debugging tools, without letting everyone else access them?%0aA:You can easily & automatically allow debugging for anyone with admin privileges (meanwhile leaving it off for everyone else) by including this line in @@config.php@@ - ''just be sure that 1) $EnableDiag is either null or set to 0, and 2) to include it near the end of @@config.php@@, AFTER declaring your passwords, and after any AuthUser or other privilege settings'':%0a%0a-->%25hlt php%25@@if (CondAuth($pagename, 'admin')) $EnableDiag = 1;  # allows admin to always call phpinfo, etc@@%0a%0a>>%3c%3c%0a
time=1660940390
